Commit 1acf15e
authored
feat(native): port Clojure extractor to Rust (#1097)
* feat(native): port Clojure extractor to Rust
Adds tree-sitter-clojure dependency and native extractor matching
the WASM-side behavior for Clojure symbol, import, and call extraction.
Part of #1071
* fix(native): harden clojure extractor child iteration and document parity gaps
Address Greptile review feedback on PR #1097:
- `find_first_symbol`/`find_second_symbol`: replace `?` with `match` so a
`None` from `list_node.child(i)` skips and continues instead of aborting
the whole scan, matching the JS extractor's `if (!child) continue;`
semantics. Practically inert today (tree-sitter always returns `Some`
for `i < child_count()`), but makes the invariant explicit and removes
a fragile divergence.
- `extract_clojure_params`: document the known `defmethod` dispatch-vector
gap inherited from the JS extractor.
- `handle_import_form`: document why top-level `(require 'some.ns)` and
`(require '[some.ns :as s])` are silently dropped and point maintainers
at the working `(ns ...)` path in `extract_ns_requires`.1 parent f6c0289 commit 1acf15e
11 files changed
Lines changed: 529 additions & 10 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 | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| 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 | | |
786 | 785 | | |
787 | 786 | | |
| |||
0 commit comments