Files
AILang/crates/ailang-surface
Brummel 9b0eb58cd9 refactor(surface): share the copy-pasted parser sub-productions
Round-trip-preserving — the byte-isomorphic Form-A ↔ JSON-AST tests,
the hash pins, and the full fixture-corpus parse are all green; error
strings passed through verbatim, not homogenised.

- The Int/Float/Str/true/false literal-token match was inlined in three
  parsers; extracted try_parse_literal_token and routed parse_pat_lit
  and the parse_term fallthrough through it.
- parse_doc and parse_export were identical but for the keyword; both
  now go through one parse_string_attr, and the previously
  doc/export-bypassed expect_string helper is back on the shared path.
- parse_effects_clause and parse_forall_constraints_clause shared the
  expect-keyword / collect / reject-empty / expect-rparen shape;
  unified under parse_repeating_clause, with each clause's empty-error
  message passed in.

parse_intrinsic_attr was left inline-able-but-not-inlined: it has two
call sites, so inlining would re-duplicate a documented helper.
2026-06-02 02:17:51 +02:00
..