Skip to content

Conversation

@alexcrocha
Copy link

@alexcrocha alexcrocha commented Oct 16, 2025

Add explicit Rust names for AST nodes and simplify code generation

Instead of auto-generating nested module paths from RBS nested naming conventions, use explicit rust_name fields in config.yml and generate flat structs.

  • Add rust_name field to all node definitions in config.yml
  • Remove complex module/path parsing logic from build.rs
  • Generate flat structs (e.g., ClassNode) instead of nested modules
  • Add Node enum to wrap all node types

This makes the generated Rust code easier to work with.

Copy link
Author

alexcrocha commented Oct 16, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alexcrocha alexcrocha force-pushed the ar-simplify-rust-node-generation branch from 51c7833 to 7c61c38 Compare October 16, 2025 11:22
@alexcrocha alexcrocha marked this pull request as ready for review October 16, 2025 11:29
@alexcrocha alexcrocha force-pushed the ar-simplify-rust-node-generation branch from 7c61c38 to ca7e472 Compare October 16, 2025 11:53
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Much simpler

Instead of auto-generating nested module paths from RBS nested naming
conventions, use explicit rust_name fields in config.yml and generate
flat structs.

- Add rust_name field to all node definitions in config.yml
- Remove complex module/path parsing logic from build.rs
- Generate flat structs (e.g., ClassNode) instead of nested modules
- Add Node enum to wrap all node types

This makes the generated Rust code easier to work with.
alexcrocha added a commit that referenced this pull request Jan 13, 2026
## Add explicit Rust names for AST nodes and simplify code generation

Instead of auto-generating nested module paths from RBS nested naming
conventions, use explicit `rust_name` fields in `config.yml` and
generate flat structs.

- Add `rust_name` field to all node definitions in `config.yml`
- Remove complex module/path parsing logic from build.rs
- Generate flat structs (e.g., `ClassNode`) instead of nested modules
- Add `Node` enum to wrap all node types

This makes the generated Rust code easier to work with.
alexcrocha added a commit that referenced this pull request Jan 13, 2026
## Add explicit Rust names for AST nodes and simplify code generation

Instead of auto-generating nested module paths from RBS nested naming
conventions, use explicit `rust_name` fields in `config.yml` and
generate flat structs.

- Add `rust_name` field to all node definitions in `config.yml`
- Remove complex module/path parsing logic from build.rs
- Generate flat structs (e.g., `ClassNode`) instead of nested modules
- Add `Node` enum to wrap all node types

This makes the generated Rust code easier to work with.
alexcrocha added a commit that referenced this pull request Jan 14, 2026
## Add explicit Rust names for AST nodes and simplify code generation

Instead of auto-generating nested module paths from RBS nested naming
conventions, use explicit `rust_name` fields in `config.yml` and
generate flat structs.

- Add `rust_name` field to all node definitions in `config.yml`
- Remove complex module/path parsing logic from build.rs
- Generate flat structs (e.g., `ClassNode`) instead of nested modules
- Add `Node` enum to wrap all node types

This makes the generated Rust code easier to work with.
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.

3 participants