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

The syntax for WebIDL2JSValueAsUnsupported is invalid #117

Closed
saschanaz opened this issue Dec 8, 2018 · 2 comments · Fixed by #125
Closed

The syntax for WebIDL2JSValueAsUnsupported is invalid #117

saschanaz opened this issue Dec 8, 2018 · 2 comments · Fixed by #125

Comments

@saschanaz
Copy link
Contributor

saschanaz commented Dec 8, 2018

interface URLSearchParamsCollection {
  [WebIDL2JSValueAsUnsupported=null] getter URLSearchParams? namedItem(DOMString name);
};

Here, null is tokenized as a terminal symbol null rather than an identifier per the grammar:

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.

And thus cannot be parsed as:

ExtendedAttributeIdent ::
    identifier = identifier

Currently webidl2.js 13+ fails to parse it, so this should be fixed before upgrading to the latest version.

@saschanaz
Copy link
Contributor Author

The easiest workaround would be adding the escape character _ before null.

@saschanaz
Copy link
Contributor Author

saschanaz commented Dec 12, 2018

By the way, I think [WebIDL2JSValueAsUnsupported=null] is not needed as ? already means nullable per the spec.

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 a pull request may close this issue.

1 participant