Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated source contains pub #519

Closed
ndmitchell opened this issue Apr 6, 2020 · 1 comment · Fixed by #804
Closed

Generated source contains pub #519

ndmitchell opened this issue Apr 6, 2020 · 1 comment · Fixed by #804

Comments

@ndmitchell
Copy link
Contributor

After generating a grammar with lalrpop 0.18.1 the resulting file contains a number of pub entires:

  • pub struct __StateMachine
  • pub trait __ToTriple
  • pub enum __Symbol

These leak into my library API, which isn't great. But worse, because __Symbol contains all the AST nodes of my grammar, it forces those nodes to be public too. Should lalrpop only ever use pub(crate)? Or is there a configuration to avoid public symbols? I already use pub(crate) TopLevel: ... in my definitions.

@andersk
Copy link
Contributor

andersk commented Jan 1, 2023

It looks like #584 fixed __StateMachine and __Symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants