ZeParser icon indicating copy to clipboard operation
ZeParser copied to clipboard

Literals aren't valid label names

Open ghost opened this issue 14 years ago • 0 comments

ZeParser parses true: var a = 3; without emitting any errors, even though this input raises a SyntaxError in all major implementations. The spec appears to confirm that this is invalid—the grammar for LabelledStatement (Identifier) excludes ReservedWord, which comprises Keyword, NullLiteral, and BooleanLiteral.

ghost avatar Dec 30 '11 04:12 ghost