Open
Conversation
Add Lua (.lua) as the 19th supported language with full Tree-sitter grammar support for functions, imports, call sites, and test detection. Lua-specific handling includes: - require() calls extracted as IMPORTS_FROM edges - Variable-assigned anonymous functions (local fn = function() end) - Table-qualified methods via dot syntax (function Tbl.method()) - Table-qualified methods via colon syntax (function Tbl:method()) - Correct parent assignment for metatable-based OOP patterns - Test function detection (test_* pattern) Changes: - parser.py: extension mapping, 4 node-type dicts, Lua constructs handler with 3 sub-handlers, _get_name and _get_call_name branches - tests/fixtures/sample.lua: 139-line fixture covering require imports, top-level/local/anonymous functions, OOP with metatables, inheritance, method calls (dot + colon), and test functions - tests/test_multilang.py: 14 tests in TestLuaParsing - CLAUDE.md, README.md: 18 → 19 languages Full suite: 516 passed, 0 failed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.lua) as the 19th supported language with full Tree-sitter grammar supportrequire()imports, metatable-based OOP (dot and colon syntax), and variable-assigned anonymous functionsWhat's extracted
function greet(name)local function helper(x)local fn = function(x) endfunction Animal.new(name)function Animal:speak()local json = require("cjson")print("hello")obj:method()/obj.method()function test_greet()Files changed
code_review_graph/parser.py_extract_lua_constructshandler with 3 sub-handlers,_get_nameand_get_call_namebranchestests/fixtures/sample.luatests/test_multilang.pyTestLuaParsingclass with 14 testsCLAUDE.mdREADME.md