parser: apply ASI when TS contextual keywords precede a newline - #34258
Merged
Claude / Claude Code Review
completed
Jul 15, 2026 in 13m 9s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/js_parser/parse/parse_stmt.rs:1793-1797 |
Confusing diagnostic: 'Expected "class" but found "class"' |
Annotations
Check warning on line 1797 in src/js_parser/parse/parse_stmt.rs
claude / Claude Code Review
Confusing diagnostic: 'Expected "class" but found "class"'
nit: this produces the self-contradictory diagnostic `Expected "class" but found "class"` (codified verbatim in the new tests at transpiler.test.js:235-236), because `p.lexer.expected(T::TClass)` fires while the lexer is already sitting on `T::TClass`. Consider matching esbuild's `Decorators are not valid here` or this file's existing `Unexpected newline after "..."` pattern instead. Same applies to the `TsStmtDeclare` arm at lines 1813-1814.
Loading