peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
883 stars 63 forks source link

Grammar with token "constructor" fails to generate #520

Closed PaulGVernon closed 3 weeks ago

PaulGVernon commented 3 weeks ago

I noticed that the following grammar

a = "constructor"

fails in version 4.0.2 with

error parsing grammar
Cannot read properties of undefined (reading 'length')

This was not the case in version 3.0.2

hildjj commented 3 weeks ago

Validated, and I see where the problem is. Investigating solutions.

hildjj commented 3 weeks ago

I'll do a release later today, after fixing #513 and #522.