Open dzpao opened 4 years ago
This really should be optional (i.e. a command line flag), otherwise it would break lots of things built with peg.
Rule names that start with an underscore could be ignored.
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.
The syntax: 'Rule <= Ignored' could be added. Rules that are not ignored would still be 'Rule <- NotIgnored'.
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.
flag implemented: https://github.com/lolbinarycat/peg/tree/ignoreCase-flag
This should close #98.