mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-13 03:58:33 +00:00
Add Lua as a supported language with symbol extraction and scope-resolution
at parity with existing languages.
Vendored grammar:
- Vendor tree-sitter-lua (v2.1.3, MIT). Upstream ships nan-based node
bindings incompatible with the pinned tree-sitter@0.21.1 runtime
(setLanguage rejects with "Invalid language object"), so the grammar C
sources are rebuilt against a Napi binding adapted from tree-sitter-c.
Symbol extraction (legacy tree-sitter queries):
- Function, Method, and Class definitions; call sites.
Scope-resolution (CALLS + IMPORTS edges):
- emitScopeCaptures, interpretImport, and a Lua ScopeResolver registered
in the scope-resolution pipeline.
- Import resolution via a SuffixIndex so root-level modules (e.g.
require("middleclass")) resolve, not just dotted paths.
Class structure (EXTENDS + HAS_METHOD + METHOD_OVERRIDES):
- middleclass class("Name", Parent) and function Class:method() handled
via a heritage edge hook (emitHeritageEdges), since middleclass has no
syntactic class body for the standard heritage/ownership walk.
Registered in all dispatch tables (SupportedLanguages enum, language
detection, parser-loader, parse-worker languageMap, language
classification, scope-resolver registry, vendored-grammar manifest).
Verified: tsc --noEmit clean; analyze on a Lua sample produces Class,
Method, EXTENDS, HAS_METHOD, METHOD_OVERRIDES, IMPORTS, and CALLS.
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| actions | ||
| claude-canary-runtime | ||
| gitnexus-review-runtime | ||
| ISSUE_TEMPLATE | ||
| prompts | ||
| scripts | ||
| workflows | ||
| actionlint.yaml | ||
| CODEOWNERS | ||
| dependabot.yml | ||
| FUNDING.yml | ||
| PULL_REQUEST_TEMPLATE.md | ||
| release-drafter.yml | ||
| release.yml | ||
| vendored-grammars.json | ||
| zizmor.yml | ||