Skip to content

Named terminal symbols cannot be identifiers #156

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

Closed
saschanaz opened this issue May 14, 2018 · 0 comments
Closed

Named terminal symbols cannot be identifiers #156

saschanaz opened this issue May 14, 2018 · 0 comments

Comments

@saschanaz
Copy link
Member

interface interface {}; // shouldn't parse
enum enum {}; // shouldn't parse

interface _interface {}; // okay

Currently webidl2.js parses all string symbols as identifiers, instead it should distinguish named terminal symbols:

If the longest possible match could match one of the above named terminal symbols or one of the other terminal symbols from the grammar, it must be tokenized as the latter. Thus, the input text “long” is tokenized as the quoted terminal symbol long rather than an identifier called "long", and “.” is tokenized as the quoted terminal symbol . rather than an other.

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

1 participant