Michael Dyck wrote:
There's no way only if you're talking about an LR(0) parser. But an LR(1) parser would have 1 token of lookahead to resolve the conflict:
 -- if the next token is ":", reduce IdentifierName to PropertyName;
 -- if the next token is an IdentifierName, shift that.
 -- if the next token is anything else, syntax error.

Don't forget method definition shorthand syntax, if the next token is "(". Then the method is named "get", of course.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to