GitNexus/gitnexus-shared
taoxin 8e7da9d844 feat(languages): add Lua language support
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>
2026-10-12 17:56:37 +08:00
..
src feat(languages): add Lua language support 2026-10-12 17:56:37 +08:00
package-lock.json chore(deps)(deps-dev): bump typescript in /gitnexus-shared (#2941) 2026-08-13 06:23:16 +01:00
package.json chore(deps)(deps-dev): bump typescript in /gitnexus-shared (#2941) 2026-08-13 06:23:16 +01:00
tsconfig.json feat: unify web and cli ingestion pipeline (#536) 2026-03-28 14:07:11 +00:00