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
Allow object
for attribute names?
#845
Comments
In general I'm in favor of not requiring folks to use underscores when it is possible to avoid doing so. Is it possible to simplify some of this by for instance requiring that an interface/dictionary/enum/callback starts with a capital? |
I think just adding Doing something more generic, I'm not sure, not least in terms of how to express it to parsers. |
@annevk I think the issue is in how the lexical grammar is defined rather than being about disambiguating top level syntactic constructs or idents within types. If a literal teletype terminal appears anywhere in the grammar, it becomes a unique terminal which is subtracted from any pattern-based terminals that the same string would otherwise have matched. So if "object" appears as a literal terminal anywhere in the grammar, it isn’t an identifier, and to make it available as one, it has to be explicitly whitelisted as an alternative where that’s desired. It’s an interesting lexical approach to the concept of reserved words — it simplifies some stuff, makes other things weird.. |
Thanks for explaining that @bathos! That helps a lot. So https://heycam.github.io/webidl/#index-prod-Other has |
We'd take the explicit "object" out of "Other" if we add it to "AttributeNameKeyword" |
@gkellogg authoring JSON-LD 1.1 wants to use
object
as a valid attribute name. Obviously_object
should work, but thenobject
looks general enough for people to want using it without preceding underscore.The text was updated successfully, but these errors were encountered: