feat: add tree-sitter Dart support, replacing regex fallback#415
Open
superkim0610 wants to merge 2 commits intosafishamsi:v4from
Open
feat: add tree-sitter Dart support, replacing regex fallback#415superkim0610 wants to merge 2 commits intosafishamsi:v4from
superkim0610 wants to merge 2 commits intosafishamsi:v4from
Conversation
Upgrade extract_dart() from regex-only to a full tree-sitter extractor using tree-sitter-dart-orchard. Now extracts classes, mixins, enums, extensions, functions, imports, inheritance, and call graphs. - Add tree-sitter-dart-orchard dependency - Custom extractor handling Dart's sibling-based method+body pairing and selector-chain call detection - 10 new tests + sample.dart fixture - Tested on 147-file Flutter project: 2562 nodes, 2682 edges, 0 errors
… walk_calls - Merge identical branches in _extract_sig_name - Convert walk_calls from recursion to iterative stack traversal - Extract _link_supertype helper to deduplicate supertype resolution - Extract _register_method helper to deduplicate method registration - Remove unnecessary list(node.children) copies - Add "imports_from" to clean_edges filter for consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extract_dart()from regex-only to a full tree-sitter extractor usingtree-sitter-dart-orchardmethod_signature+function_bodyas siblings), selector-chain call detection (nocall_expressionnode in Dart grammar)extends/with/implements), and call graphsChanges
pyproject.toml— addtree-sitter-dart-orcharddependencygraphify/extract.py— replace regexextract_dart()with tree-sitter custom extractortests/fixtures/sample.dart— new test fixturetests/test_languages.py— 10 new Dart testsTest plan