-
-
Notifications
You must be signed in to change notification settings - Fork 69
fix: escape non-member top identifiers #229
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
Conversation
| @@ -0,0 +1,4 @@ | |||
| { | |||
| "message": "Got an error during or right after parsing `interface Iroha`: The name \"Iroha\" of type \"interface\" is already seen", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/is/was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means is->was, right? What does s/ part mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, bad habit s/ meaning replace... something we do at the w3c :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I think "s/" is a vim thing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, TIL an interesting w3c (edit: vim) syntax 😁
Edit: So I have to admit I'm not very familiar with vim commands. 😮
lib/webidl2.js
Outdated
| error(`The name "${name}" of type "${names.get(name)}" is already seen`); | ||
| const unescaped = unescape(name); | ||
| if (names.has(unescaped)) { | ||
| error(`The name "${unescaped}" of type "${names.get(unescaped)}" is already seen`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, nit below belongs here.
marcoscaceres
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit.
|
Thanks! |
Fixes #228
This adds
escapedNamefield for top level definitions, and also correctly checks duplication: