Parent: #899
Problem
Five direct bare exits in parseSuper, parsePropertyName, and parseClassExpr discard the offending token or grammar context.
Executed on current main (372a9a4), six eval probes expose eval: UnexpectedToken at .... Raw JavaScriptCore 625.1.22 reports:
- an invalid
super.member as an unexpected exact token followed byExpected a property name after '.'. - bare
superassuper is not valid in this context. - a forbidden class binding as
Cannot use 'let' as a class name in strict mode. - an unterminated class field as an unexpected exact token followed by
Expected a ';' following a class field. - an invalid class property token as the exact generic unexpected token
Implementation
- Reuse the property-after-dot reason for
super.. - Attach bare
superto its keyword without a token prefix. - Retain the class binding and format its strict-name diagnostic.
- Retain invalid property and class-field follower tokens.
- Add no allocation or source scan to successful class parsing.
Decorator proposal paths are intentionally outside this issue because JavaScriptCore 625.1.22 and Node 24.18 do not provide a compatible grammar/message oracle for the syntax zig-js accepts.
Verification
- Pin reason, message, and byte offset for all six probes.
- Add a focused production eval case for each message/token family.
- Compare exact-parent class, class-fields, and super-property test262 subtrees with nonzero denominators and report flips.