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

Overriding spaces_ shouldn't be possible #10

Closed
pdubroy opened this issue May 28, 2015 · 1 comment
Closed

Overriding spaces_ shouldn't be possible #10

pdubroy opened this issue May 28, 2015 · 1 comment

Comments

@pdubroy
Copy link
Contributor

pdubroy commented May 28, 2015

Right now it's possible to override spaces_, even though there's a comment in the code saying that it shouldn't be possible to override it.

See http://jsfiddle.net/pdubroy/seuwpew3/.

@alexwarth
Copy link
Contributor

The fix for this would be to create a separate rule that's used just for property names (in object patterns) and modify name so that it no longer accepts '_'s, but IMO it's not worth it -- the add'l complexity in the Ohm grammar outweighs the benefits of this change, especially as the name spaces_ already discourages programmers from messing with this rule.

Plus, if we ever do decide to disallow '_'s in rule names, inline rule declarations won't be a syntactic sugar anymore. (Well, to be honest, they already aren't, b/c they are handled specially when they show up inside a parameterized rule.)

Anyway, here's a change that makes this comment true: a65ac62

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

No branches or pull requests

2 participants