-
Notifications
You must be signed in to change notification settings - Fork 46
Test of new binder API: Find unused definitions #1466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…vate_backend_api`
|
|
Migrated to manastech#5 to keep track of the branch, because the dependant |
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_definitionsstill uses the cursor. Other functions exploit the information from a typed AST.visit_contractis a good example.It adds a few helper functions:
Binder::navigate_toto flow from an identifier node id to a definition.Definition::nodeto obtain the innerSyntaxNode.SyntaxNode::create_cursor(self-described).astin 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_apifolder.