You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(parser)!: #{ record-literal sigil; { is always a block [#218]
Structurally removes the block-vs-record-literal ambiguity (#215
families C+D) with no lookahead heuristic, per the owner-approved
Rust-like model:
- `{` in expression position is ALWAYS a block.
- record/struct literals use `#{ … }` (anonymous `#{ x: 1 }` and
typed `Foo #{ x: 1 }`).
- record *patterns* unchanged (pattern position has no block
alternative — no ambiguity there).
Changes: HASH_LBRACE token (token.ml), `#{` lexer rule (lexer.ml;
`#` was previously unused so longest-match is collision-free), both
ExprRecord productions rerouted LBRACE -> HASH_LBRACE (parser.mly).
Menhir conflicts on origin/main (a45b021): 72 S/R + 10 R/R
after: 68 S/R + 7 R/R (-4 / -3)
Build clean. BREAKING: legacy `{ … }` record syntax no longer parses;
the codemod-migrated repo `.affine` files land in the same PR so the
253/257 gate stays green.
Refs #218#215
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments