Re: [heycam/webidl] Consider syntactic changes to WebIDL to make it more "JavaScript-y" (#485)

> is there any particular need to use these names as parameters

Where "these names" is "any keyword that is not in <https://heycam.github.io/webidl/#prod-ArgumentNameKeyword>", right?

Unfortunately, the list of keywords doesn't seem to be in any one place in the spec; it's sort of scattered as terminal symbols in the grammar.  So I can't tell whether there are other keywords which are not in ArgumentNameKeyword and hence would need escaping in argument names.  And I guess if there are we should add them to `ArgumentNameKeyword`.

OK, so maybe what's needed to decide anything here is a list of places in the spec which use identifiers without escape-hatches like `ArgumentNameKeyword`...

It doesn't help that `"foo"` is an existing production (named `string`) in the grammar, so presumably all places that use identifier where we want to allow this sort of escape would need to change to use `identifier | string`, with rules for how to convert the string to an identifier.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/485#issuecomment-445472663

Received on Saturday, 8 December 2018 16:50:05 UTC