Issue #1151: same_line in a par_fold grammar does not compile (ParseContext::<()> written in emit_core_leaves)

Open and answer this issue on GitHub.

ready · opened 2026-11-02 · updated 2026-11-02 · 0 comments

Found by the b34 builder (233786b3, ADR-339 D2).

parse and parse_bytes now give every parser a ParseContext with a LineBreaks state. A par_fold entry, however, still writes ParseContext::<()> (emit_core_leaves). So a grammar that uses same_line and has a par_fold entry does not compile.

To build

  1. Have the par_fold entry in emit_core_leaves.nika write the grammar’s state type, as parse does, instead of ().
  2. Add a tests/compiler program: a par_fold grammar that uses same_line.

This waits until the uncommitted emit_core_leaves work in the tree has landed.

Back to Open Issues