- From: Boris Zbarsky <notifications@github.com>
- Date: Wed, 30 Aug 2017 07:05:16 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 30 August 2017 14:05:39 UTC
> I have no idea what the "required" terminal is doing in there. Poking at archive.org, the last pre-bikeshed version it has is https://web.archive.org/web/20160906235942/https://heycam.github.io/webidl/ and that has this grammar: [43] AttributeName → AttributeNameKeyword | identifier That is, an attribute name can be any identifier, or "required" (which is a keyword in the grammar, as of required things in dictionaries, hence not an identifier). In other words, "attribute boolean required;" is valid IDL. I _think_ the post-bikeshed grammar is equivalent but a bit less obvious, because it doesn't make alternation quite as clear (uses whitespace, not an explicit '|' to indicate it). In any case, AttributeNameKeyword exists as a thing, as opposed to just having "required" as an alternation in AttributeName so that if we add any more keywords to IDL we'll add them to AttributeNameKeyword and not break existing uses of attributes with those names. Though we _could_ just directly add things to AttributeName, I guess. Either way. -- 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/399#issuecomment-326000829
Received on Wednesday, 30 August 2017 14:05:39 UTC