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
The portable parser's mixfix leds bound maximally tight — fine for access tails
(`.`/`(`/`[`) but wrong for a precedence-carrying led like the ternary `? :`
(`a == b ? c : d` must group as `(a == b) ? c : d`). The led loop now gates such a
led by its lbp (from the grammar's ledPrec): bind only when lbp > minBp. And a
chain-rhs led (`in`/`instanceof`) parses its trailing self-operand at the level's bp
via a new `ruleBp` step, so `a in b in c` left-chains as `(a in b) in c`. Both
derive from analyzeGrammar's ledPrecByConnector — single-sourced with the interpreter.
examples/ledjs.ts verifies it across ts/go/rust — 11/11 accept (ternary below the
operators, right-associative `a ? b : c ? d : e`, chain-rhs `in`), 4/4 reject,
byte-identical to createParser. Full suite 42/42. This is the precedence foundation
the no-`in` (suppress) context builds on next.
0 commit comments