Closed unconed closed 2 years ago
Thanks for finding that! Mutable state was being manipulated in the wrong order in the edge case of a reduction with no depth, causing an incorrect parse stack. Attached patch (released as @lezer/lr 0.15.8) should help.
While writing a grammar for WGSL, I'm finding that lezer is producing incorrectly nested nodes on a valid parse. This is happening in the latest published versions:
Given the following (reduced) grammar:
When I parse:
I get the following ASTs:
If empty,
AttributeList
appears outside the associatedStructMember
. Otherwise it correctly goes insideStructMember
. This seems like a bug?