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

Feat: Generate AST nodes only for rules that begin with a capital letter #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dzpao
Copy link

@dzpao dzpao commented Feb 3, 2020

This should close #98.

@lolbinarycat
Copy link

This really should be optional (i.e. a command line flag), otherwise it would break lots of things built with peg.

@pointlander
Copy link
Owner

Rule names that start with an underscore could be ignored.

@lolbinarycat
Copy link

No, that has the exact same problem, and just looks worse. I'm just saying that there needs to be some way to disable it, for the sake of backward compatability.

@pointlander
Copy link
Owner

The syntax: 'Rule <= Ignored' could be added. Rules that are not ignored would still be 'Rule <- NotIgnored'.

@lolbinarycat
Copy link

I guess that would work, but the syntax is non-obvious. I do like the idea of using capitalization, as it mirrors go's own behavior with (un)exported function. I simply think there needs to be a flag to turn it off.

@lolbinarycat
Copy link

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 this pull request may close these issues.

Request features to simplify AST
3 participants