Skip to content

Conversation

@ggiraldez
Copy link
Member

Migrated from Nomic repository to keep track of the branch. The red-green-trees branch is not likely to be merged in the near future.


To be merged on top of red-green-trees.

It adds as a test case in the cargo-sphere with the example from find-unused-definitions, but using the new binder and output from the backend.

Some functions are almost literal translations. For instance, collect_definitions still uses the cursor. Other functions exploit the information from a typed AST. visit_contract is a good example.

It adds a few helper functions:

  • Binder::navigate_to to flow from an identifier node id to a definition.
  • Definition::node to obtain the inner SyntaxNode.
  • SyntaxNode::create_cursor (self-described).
  • re-exports the ir2 intermediate language as ast in the backend mod.

NOTE: I screw my commits, so they're unparseable on their own. The best way to review it is to just focus on the test/src/ast_api folder.

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