You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lua: func_start misses a 'local function' that is not the first statement on its line #2461
GitGalaxy's lua func_start is start-of-line anchored (^[ \t]*(?:local[ \t\n]+)?...function),
so a local function / function declaration preceded by another statement on the same line is
missed.
locala; localfunctionf(x) x={a=1}; x={x=1}; x={G=1} end
The local a; before local function f(x) means ^[ \t]*local[ \t]+function doesn't match.
GitGalaxy finds the other 4 function f in that file (lines 133/169/205/222), missing only this
one. tree-sitter-lua and ctags both find it. (lua func recall 99.7%, this is 1 of the 2 misses.)
Second, lower-value miss in the same audit
cosmopolitan/literals.lua:80local function lexerror (s, err) — missed because the file
(test/literals.lua, the Lua test-suite's lexer torture fixture) contains adversarially
nested long-bracket strings ([==[[===[[=[]]=][====[]]===]===]====]) that defeat _LUA_LONG_BRACKET_RE's single-\1-backref shielding, corrupting the segment lexerror sits
in. Only ever exercised by this one fixture; noting it here rather than a separate issue.
Fix direction
For the first case: also scan for func_start after a ; on a line, or drop the start-of-line
anchor for the local function / function forms (they're unambiguous keywords). Needs a
regression check against the existing function -as- Mode-D-opener keyword counting.
Activity
docs(recall-audit): record the standing "is GG missing anything" answer
test(recall-audit): stop counting tree-sitter's mistakes as GitGalaxy…
fix(recall): close the 5 step-2.6 recall-audit gaps — shell/cpp/lua/d…
fix(recall): dart/typescript/lua reach 100% function recall — close t…