osa1 / parsegen

An LR parser generator, implemented as a proc macro
MIT License
15 stars 0 forks source link

Provide a way of generating non-pub parsers #4

Open osa1 opened 2 years ago

osa1 commented 2 years ago

Currently we generate structs for pub non-terminals, with a parse method. These structs are currently always pub. So if I define a grammar in an internal module and define a parser in the same module, I get a compile error because the parser is pub but its interface uses a non-pub type (the parse tree).

We should mark entry points of grammars with another symbol and use pub to make the generated parsers structs pub.