Summary
livecode has no ScopeParsingRegistry entry in gitgalaxy/core/detector.py,
so it silently falls through to Mode B (brace slicing). LiveCode has no braces for
scope — handler bodies run from on|command|function|getprop|setprop <name> to
end <name>, and control blocks are if…end if / repeat…end repeat /
try…end try / switch…end switch. Same failure class as MATLAB #1266
("the bug was entirely in routing, not the regex") and yacc #2351.
Impact
On language-crucible/data/livecode/ (97 ingested files):
|
raw regex |
pipeline struct_func_start |
pipeline function_count (named list) |
| func_start |
847 |
781 |
1 |
function_data has 1 row for the entire corpus (escape, in
revliburl.livecodescript). The func_start regex itself is correct — 781 real
handler signals are counted — but _slice_by_braces finds no {/} and produces
no FunctionNodes, so every downstream consumer (named function list, per-function
complexity, per-function args count, LanguageChartData.gg_args_found) sees an
empty corpus.
This also blocks the livecode tri-comparison Func Found / Func Precision / Args
Found chart panels from ever showing real numbers, and blocks a manual-verification
badge for the language.
Proposed fix (needs design)
A mode_d entry, e.g.:
"livecode": {
"mode": "mode_d",
"openers": [r"\bon\b", r"\bcommand\b", r"\bfunction\b", r"\bgetprop\b",
r"\bsetprop\b", r"\brepeat\b", r"\btry\b", r"\bswitch\b", r"\bif\b"],
"closers": [r"\bend\b"],
"function_opener": r"\b(?:on|command|function|getprop|setprop)\b",
"ignore_case": True,
},
but LiveCode needs its own guards that the generic mode_d loop doesn't have:
if … then <statement> one-liners (no end if) must not increment depth —
analogous to the existing Ruby/Elixir inline-modifier guard in _slice_by_keywords.
else / else if are not openers.
next repeat / exit repeat / exit to top / pass <msg> must not affect depth.
function also appears as an operator in expressions (the … function of …) —
needs a start-of-statement anchor like other mode_d langs.
- Once # lands,
handler / end handler for .lcb.
Because of these guards this is real design work, not a one-line registry add —
tracked as its own issue rather than fixed inline in the manual-verification sweep.
Found by
tri-comparison-ledger-sweep skill, livecode manual-verification pass (2026-08-28).
Summary
livecodehas noScopeParsingRegistryentry ingitgalaxy/core/detector.py,so it silently falls through to Mode B (brace slicing). LiveCode has no braces for
scope — handler bodies run from
on|command|function|getprop|setprop <name>toend <name>, and control blocks areif…end if/repeat…end repeat/try…end try/switch…end switch. Same failure class as MATLAB #1266("the bug was entirely in routing, not the regex") and yacc #2351.
Impact
On
language-crucible/data/livecode/(97 ingested files):struct_func_startfunction_count(named list)function_datahas 1 row for the entire corpus (escape, inrevliburl.livecodescript). Thefunc_startregex itself is correct — 781 realhandler signals are counted — but
_slice_by_bracesfinds no{/}and producesno
FunctionNodes, so every downstream consumer (named function list, per-functioncomplexity, per-function args count,
LanguageChartData.gg_args_found) sees anempty corpus.
This also blocks the livecode tri-comparison Func Found / Func Precision / Args
Found chart panels from ever showing real numbers, and blocks a manual-verification
badge for the language.
Proposed fix (needs design)
A
mode_dentry, e.g.:but LiveCode needs its own guards that the generic mode_d loop doesn't have:
if … then <statement>one-liners (noend if) must not increment depth —analogous to the existing Ruby/Elixir inline-modifier guard in
_slice_by_keywords.else/else ifare not openers.next repeat/exit repeat/exit to top/pass <msg>must not affect depth.functionalso appears as an operator in expressions (the … function of …) —needs a start-of-statement anchor like other mode_d langs.
handler/end handlerfor.lcb.Because of these guards this is real design work, not a one-line registry add —
tracked as its own issue rather than fixed inline in the manual-verification sweep.
Found by
tri-comparison-ledger-sweepskill, livecode manual-verification pass (2026-08-28).