Skip to content

[v2] Migrate AST API#1597

Open
ggiraldez wants to merge 9 commits intomainfrom
ggiraldez/v2-migrate-ast
Open

[v2] Migrate AST API#1597
ggiraldez wants to merge 9 commits intomainfrom
ggiraldez/v2-migrate-ast

Conversation

@ggiraldez
Copy link
Copy Markdown
Contributor

@ggiraldez ggiraldez commented Apr 1, 2026

This is a more or less straight migration of the remaining functionality in v1 to v2, with the difference that it's now split in the new v2 crates according to area of function. This includes:

  • AST API: nodes and visitor via template generation and the node extensions for developer ergonomics
  • ABI related functionality, mostly as AST node extensions
  • get_file_ast_root and a couple other convenience methods added to CompilationUnit
  • all the unit tests that previously lived in tests/backend ported to their respective v2 crate

This PR should bring (almost) feature parity to v2 in terms of AST API. Main missing feature is location information for AST nodes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

⚠️ No Changeset found

Latest commit: 592548c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ggiraldez ggiraldez force-pushed the ggiraldez/v2-migrate-passes branch from 29a3535 to bc864d2 Compare April 3, 2026 01:42
Base automatically changed from ggiraldez/v2-migrate-passes to main April 3, 2026 02:39
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-migrate-ast branch 2 times, most recently from 65c6bfe to ac7e834 Compare April 7, 2026 21:30
@ggiraldez ggiraldez changed the base branch from main to ggiraldez/v2-refactor-semantic April 7, 2026 21:31
@@ -44,7 +45,41 @@ impl CompilationUnit {
self.files.get(id).cloned()
}

// TODO: this should be semi-public
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding a note about migrating the new APIs from #1593:

#1599 (comment)

@ggiraldez ggiraldez marked this pull request as ready for review April 8, 2026 16:58
@ggiraldez ggiraldez requested review from a team as code owners April 8, 2026 16:58
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-refactor-semantic branch from 8cfd5a0 to 6917bfd Compare April 8, 2026 21:14
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-migrate-ast branch 2 times, most recently from 091a9aa to 5dc7adb Compare April 8, 2026 21:35
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-refactor-semantic branch from 6917bfd to 049758d Compare April 9, 2026 20:43
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-migrate-ast branch from 5dc7adb to e917ee5 Compare April 9, 2026 20:44
Base automatically changed from ggiraldez/v2-refactor-semantic to main April 13, 2026 15:21
@ggiraldez ggiraldez force-pushed the ggiraldez/v2-migrate-ast branch from e917ee5 to 592548c Compare April 13, 2026 15:34
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.

2 participants