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.
Currently we generate structs for
pub
non-terminals, with aparse
method. These structs are currently alwayspub
. 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 ispub
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 structspub
.