Commit c70d281
fix(parser): enforce trailing semicolon on field_decl
Previously parseFieldDecl discarded the result of
`expect(p, Semicolon)` via `let _ = ...`, silently accepting a
missing trailing `;` on a region field. That contradicted EBNF
grammar.ebnf §field_decl which requires the semicolon.
Fix: propagate the Semicolon error. L1 test suite gains a case
locking in the stricter behaviour. All other suites still pass:
- ParserTests: 88/88 (unchanged)
- E2E driver: 4/4 clean, 2 honest-skip for L11/L12
- L1-L3: 17/17 (was 16; L1 grew from 7 to 8)
Scope sweep confirmed no regression risk: grep for field-like
lines without `;` surfaced 12 hits, all function parameters
(comma-separated, not field_decls). No example / test fixture
relied on the old looseness.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e8b3f6a commit c70d281
2 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1331 | 1331 | | |
1332 | 1332 | | |
1333 | 1333 | | |
1334 | | - | |
1335 | | - | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1336 | 1342 | | |
1337 | 1343 | | |
1338 | 1344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
0 commit comments