Commit 06b6536
authored
feat(native): port Gleam extractor to Rust (#1105)
* feat(native): port Gleam extractor to Rust
* fix(gleam): use named_child to skip anonymous punctuation tokens
Replaces child(0) fallbacks in handleCall / handle_call with
named_child(0) in both the native Rust and WASM/JS Gleam extractors.
The Gleam tree-sitter grammar's field_access node includes the '.'
punctuation token as a child, so child(0) on field_access could
return '.' as the receiver text on malformed input. named_child(0)
skips anonymous tokens and is consistent across both engines.
The field accessors always succeed on valid Gleam, so this only
affects the defensive fallback path, but it removes a silent
asymmetry that Greptile flagged in review of #1105.
* fix(gleam): match both function_call and call nodes for parity with JS (#1105)
* fix(gleam): align alias fallback with JS extractor and add aliased import test (#1105)
* test: add explicit .gleam assertion to NATIVE_SUPPORTED_EXTENSIONS test (#1105)1 parent 11f975a commit 06b6536
13 files changed
Lines changed: 506 additions & 17 deletions
File tree
- crates/codegraph-core
- src
- extractors
- src
- ast-analysis/rules
- domain
- extractors
- tests/parsers
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
784 | | - | |
785 | 784 | | |
| 785 | + | |
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| |||
0 commit comments