mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-15 23:32:49 +00:00
Wires Zig (.zig) into the ingestion pipeline as a first-class language.
Adds a tree-sitter-zig parser binding, language config, tree-sitter
queries, and dedicated extractor configs (class/method/call/field/type/
variable/import/named-binding).
Highlights of the Zig modeling:
- Container types (struct/enum/union) are bound via `variable_declaration`
in the Zig grammar; the class extractor walks the RHS to disambiguate
the label (Struct / Enum / Class — Union handling lands separately).
- @import("./path.zig") relative imports resolve against the importing
file; stdlib/builtin/root names are intentionally returned as null.
- Bare-name @import("pkg") for build.zig.zon dependencies is left as a
TODO (resolved in a follow-up commit).
- Top-level const/var declarations whose RHS is a struct/enum/union are
filtered out of the Const set so they don't double-emit alongside the
type node.
Validated end-to-end on FuryForged (~9,400 symbols, 700+ Zig functions):
function-level resolution, cross-file impact walks, and @import-driven
module edges all behave correctly.
Includes a fixture + integration test (test/integration/resolvers/
zig.test.ts) covering struct/enum detection, method extraction, and
relative-import resolution.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||
| global-setup.ts | ||
| vitest.d.ts | ||