jsinger67 / parol

LL(k) and LALR(1) parser generator for Rust
https://jsinger67.github.io/
Apache License 2.0
189 stars 19 forks source link

Use `inner_name()` for variant names in range generation #393

Closed ryo33 closed 2 months ago

ryo33 commented 2 months ago

Hi, I find this bug in my new project with activating the range generation option.

Without this change, in ToSpan impls, it outputs Boolean::BooleanTrue(v) => v.span(), instead of Boolean::True(v) => v.span(), for grammars like Boolean: True | False, and ASTType::UNNAMED(v) => { for grammar symbols with *Opt suffix.

I have tried to add failing tests about this, but I cannot figure out a proper place to have this test case and test data.