-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add dart parser #10510
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
base: main
Are you sure you want to change the base?
Add dart parser #10510
Conversation
This PR adds Dart language support to the tree-sitter integration for codebase indexing. The implementation is solid with all 17 tests passing. All previously identified issues have been resolved.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| (initialized_variable_definition | ||
| name: (identifier) | ||
| value: (identifier) @name | ||
| value: (selector | ||
| "!"? | ||
| (argument_part | ||
| (arguments | ||
| (argument)*))?)?) @reference.class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern specifies the value: field twice with incompatible node types (identifier on line 75 and selector on line 76). In tree-sitter queries, when the same field is specified multiple times in a pattern, all constraints must match the same node simultaneously. Since a node cannot be both an identifier and a selector, this pattern will never match anything. This is a minor issue since it only affects reference capture (not definition capture), and the primary purpose of the parser works correctly as shown by the passing tests.
Fix it with Roo Code or mention @roomote and request a fix.
Add dart language to the code base index. Needs to update tree-sitter-wasms to get the new dart tree sitter web assembly.
Some proof of works


Closes #8662
Important
Add Dart language support with tree-sitter parser, queries, and tests.
tree-sitter-wasmsto^0.1.13inpackage.json.languageParser.tsand registers Dart extension inindex.ts.dartQueryinqueries/dart.tsto capture Dart language constructs like classes, methods, functions, mixins, extensions, enums, and type aliases.parseSourceCodeDefinitions.dart.spec.tsto test Dart parsing, covering class definitions, method signatures, mixins, extensions, enums, type aliases, and more.This description was created by
for 52c2574. You can customize this summary. It will automatically update as commits are pushed.