Skip to content

Conversation

@mahaat
Copy link

@mahaat mahaat commented Jan 7, 2026

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
Screenshot 2026-01-07 at 15 13 40
Screenshot 2026-01-07 at 15 14 59

Closes #8662


Important

Add Dart language support with tree-sitter parser, queries, and tests.

  • Behavior:
    • Adds Dart language support to the codebase by updating tree-sitter-wasms to ^0.1.13 in package.json.
    • Integrates Dart parser in languageParser.ts and registers Dart extension in index.ts.
  • Queries:
    • Adds dartQuery in queries/dart.ts to capture Dart language constructs like classes, methods, functions, mixins, extensions, enums, and type aliases.
  • Tests:
    • Adds parseSourceCodeDefinitions.dart.spec.ts to test Dart parsing, covering class definitions, method signatures, mixins, extensions, enums, type aliases, and more.

This description was created by Ellipsis for 52c2574. You can customize this summary. It will automatically update as commits are pushed.

@mahaat mahaat requested review from cte, jr and mrubens as code owners January 7, 2026 08:23
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Jan 7, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 7, 2026

Rooviewer Clock   See task on Roo Cloud

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.

  • dart.ts:73-80 - Tree-sitter query pattern with duplicate value: field will never match
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines 73 to 80
(initialized_variable_definition
name: (identifier)
value: (identifier) @name
value: (selector
"!"?
(argument_part
(arguments
(argument)*))?)?) @reference.class
Copy link
Contributor

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.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add .dart support to tree-sitter

2 participants