Commit aa7812b
authored
feat(native): port Julia extractor to Rust (#1098)
* feat(native): port Julia extractor to Rust
Adds tree-sitter-julia dependency and native extractor matching
the WASM-side behavior for Julia symbol, import, and call extraction.
Part of #1071
* fix(parser): register .jl in NATIVE_SUPPORTED_EXTENSIONS
Native Julia support landed in this PR but the JS-side mirror of the
Rust LanguageKind enum was not updated, so the drift guard in
tests/parsers/native-drop-classification.test.ts (and the WASM-only
bucket in classifyNativeDrops) flagged .jl as missing. Add .jl to the
set and drop it from the WASM-only test fixture.
* fix(julia): emit base name for parameterized abstract types
handle_abstract_def previously fell back to the type_head node itself
when no plain identifier was found, dumping the full raw text
"Name{T} <: Super{T,1}" as a definition name for any parameterized
generic abstract type. The TS counterpart returns early on no-name; the
native port should match.
Recurse into wrapper shapes (binary_expression, parameterized identifier,
type_parameter_list, type_argument_list) to locate the base identifier,
and skip emission when none is found. Adds a regression test asserting
the base name "AbstractVector" for
"abstract type AbstractVector{T} <: AbstractArray{T,1} end".
* fix(native/julia): handle parameterized structs, qualified defs, qualified selected imports (#1098)1 parent 06aaa85 commit aa7812b
11 files changed
Lines changed: 804 additions & 9 deletions
File tree
- crates/codegraph-core
- src
- extractors
- src
- ast-analysis/rules
- domain
- 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 | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
786 | 785 | | |
787 | 786 | | |
788 | 787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
| |||
0 commit comments