Closed bathos closed 8 years ago
(Or -- I think using a colon instead of an equals sign would permit a cover grammar to be employed to disambiguate these sorts of issues, not to mention it would remain consonant with object literal properties, which currently share most of class body's grammar).
The expressions are terminated by semicolons. See the grammar in README.md.
Sorry, I missed the bit I was looking for (the EBNF block).
Does the spec have a grammar specification under development? It seems like the implied grammar, especially with decorators in the mix, has issues that no amount of lookaheads could disambiguate:
Did the decorator
foo [bar] = baz = derp
decorate a generator method namedderpGen
?Did the decorator
foo
decorate the property[bar]
, whose value wasbaz
, and which was followed by a generator method namedderpGen
?Did the decorator
foo
decorate the property[bar]
, whose value wasbaz = derp * derpGen()
, and which was followed by a syntax error?This stuff is tricky, and I may just be overlooking something, but it seems as if the grammar might need to either be linebreak sensitive or perhaps mandate semicolons (which would be a little weird, since these aren't statements).