Skip to content

refactor: split parser and generator responsibilities - #215

Merged
cruskell merged 1 commit into
mainfrom
codex/split-parser-and-generator-responsibilities
Oct 18, 2026
Merged

cruskell merged 1 commit into
mainfrom
codex/split-parser-and-generator-responsibilities

Conversation

@cruskell

Copy link
Copy Markdown
Owner

Large parser and generator methods mixed grammar dispatch with detailed statement, declaration, control-flow, and call handling. Extract statement grammar helpers, global declaration specifiers and function-body parsing; move control-flow and call arms into dedicated modules in all three backends. Split Node and Type operations into focused private modules, keeping their definitions and public inherent interfaces accessible through the existing module paths.

Validation:

  • Rust 1.86 formatting, strict all-target/all-feature Clippy, and full all-feature tests: 51 unit, 2,101 integration and 1 doc passed; 2 optional integration tests ignored.
  • Three representative programs: 12 native outputs (both architectures, Linux/macOS) byte-identical to the baseline; 3 LLVM outputs identical after normalizing existing declaration-order/blank-line nondeterminism. Non-host native output was compared, not executed locally.
  • Required sub-agent self-review found an accidentally removed Break no-result classification; restored in both native backends. Final review confirmed no outstanding findings, unchanged Node/Type method bodies, and preserved parser/backend operations and comments.

@cruskell
cruskell merged commit 7804347 into main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant