Skip to content

feat(graph): add Lua language support - #187

Merged
shhdwi merged 1 commit into
trailhq:mainfrom
CroissantEdit:feat/lua-support
Aug 24, 2026
Merged

shhdwi merged 1 commit into
trailhq:mainfrom
CroissantEdit:feat/lua-support

Conversation

@CroissantEdit

Copy link
Copy Markdown
Contributor

Summary

  • Add Lua (.lua) to the breadth-tier generic extractor using the existing tree-sitter-wasm Lua grammar
  • Register Lua in GENERIC_LANGS
  • Add lua.scm queries for function and method definitions and call references
  • Cover local functions, assigned functions, function-valued table fields, and : method syntax
  • Update the supported-language documentation

Test results

npm run build passes.

npm test: 832 passed, 5 skipped, 0 failed.

@shhdwi

shhdwi commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Verified locally on top of current main (clean merge; build clean).

Breadth-tier add (lua in GENERIC_LANGS + lua.scm); no npm dep, no committed binary (grammar ships in the existing tree-sitter-wasm bundle). Ships a test — generic-extract.test.ts 16/16 with the Lua case.

Behavioral on a real .lua file: 5 nodes (3 function, 1 method, 1 file), 2 edges, no garbage (table holder + body locals not emitted). helper/compute/Widget:run/table-field greet all extracted; call edges resolve both ways (compute → helper, run → compute) via graft callers; the query covers all four Lua definition forms. Merging.

@shhdwi
shhdwi merged commit 0dd234b into trailhq:main Aug 24, 2026
1 of 2 checks passed
@ansien

ansien commented Aug 29, 2026 •

Copy link
Copy Markdown

Hey @CroissantEdit - What would be the difficulty of also adding Luau support? Syntax wise they're 99% similar I believe.

EDIT: Created a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants