Skip to content

Refactor parser AST into modules#89

Merged
leynos merged 8 commits intomainfrom
codex/extract-parser-ast-submodules
Jul 20, 2025
Merged

Refactor parser AST into modules#89
leynos merged 8 commits intomainfrom
codex/extract-parser-ast-submodules

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jul 19, 2025

Summary

  • extract the parser::ast module into dedicated files
  • keep small unit tests with clippy::expect_used allowances
  • update parser::mod to reference the new module layout

Testing

  • make lint
  • make test

https://chatgpt.com/codex/tasks/task_e_687b5d5a1ac88322be55977fc6787c38

Summary by Sourcery

Modularize the parser’s lightweight AST wrappers into dedicated files, introduce shared syntax utilities, and update module exports and tests accordingly.

New Features:

  • Add syntax_utils::parse_parenthesized_list for extracting comma-separated lists from syntax elements
  • Add parse_utils::extract_parenthesized helper for balanced delimiter extraction

Enhancements:

  • Refactor parser::ast into separate modules for import, function, index, relation, rule, root, transformer, and type_def
  • Update parser::mod and lib.rs to reference the new AST module structure and re-export utilities

Tests:

  • Add focused unit tests for each AST wrapper and utility function with clippy::expect_used allowances

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant