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 Mode-D: dotted / method-style function heads (function a.b.c:f()) not fully name-resolved #2438
The lua function_opener added to ScopeParsingRegistry in the tri-comparison-ledger-sweep
(^[ \t]*(?:local[ \t]+)?(?:export[ \t]+)?function\b) drives the nesting-independent
second-pass extraction that recovered ~73 real lua functions
(lua/function/existence/agree[ctags,tree_sitter]_vs[gitgalaxy], 82 -> 32). The remaining gap
includes dotted / method-style declaration heads that _extract_semantic_name's lua branch and /
or the function_opener scan don't fully resolve:
tree-sitter-lua and Universal Ctags both name these (a.b.c.f1, a:deep, a:x); GitGalaxy's
own func_start regex captures [a-zA-Z_][\w.:]* so the raw signal is there, but the Mode-D
name resolution drops or mis-attributes the multi-segment head.
Scope
Small follow-on to the function_opener fix -- widen the lua branch of _extract_semantic_name / the function_opener pattern to keep the full dotted/: path, then
re-run tri_comparison_chart.py --languages lua and confirm the shape shrinks further.
Fixed in #2444. Root cause turned out to be different from the issue's framing: _extract_semantic_name already resolves a.b.c.f1 / a:deep fine. The real gap was that a one-liner function f (...) ... end has an equal opener/closer count, so its net Mode-D scope change is <= 0 -- the primary scan filed it as global dust and the function_opener pass skipped it (depth_before_line[i] <= 0). Also affected plain names, redefinitions, and everything nested in a bare do block. Fixed by extending function_opener to top-level self-closing declarations (lua-scoped). found_functions 557 -> 618.
Activity
fix(lua): Mode-D nested-function recall + literal-shield tokenisation
fix(lua): Mode-D nested-function recall + literal-shield tokenisation (…
squid-protocol commentedon Aug 29, 2026
Fixed in #2444. Root cause turned out to be different from the issue's framing:
_extract_semantic_namealready resolvesa.b.c.f1/a:deepfine. The real gap was that a one-linerfunction f (...) ... endhas an equal opener/closer count, so its net Mode-D scope change is <= 0 -- the primary scan filed it as global dust and thefunction_openerpass skipped it (depth_before_line[i] <= 0). Also affected plain names, redefinitions, and everything nested in a baredoblock. Fixed by extendingfunction_openerto top-level self-closing declarations (lua-scoped). found_functions 557 -> 618.