Repository navigation
Description
Summary
livecode's func_start / args rules only recognize LiveCode Script handler
syntax (on|command|function|getprop|setprop <name>). They match nothing in
LiveCode Builder (.lcb) files, which declare callables with the handler
keyword: handler, public handler, private handler, foreign handler,
public foreign handler.
Across language-crucible/data/livecode/ the 35 .lcb files contain 471 handler
declarations, 0 detected (struct_func_start = 0 for every .lcb file; all 781
detected func_start signals come from the 63 .livecodescript files).
Evidence
language-crucible/data/livecode/livecode/array.lcb:
21: module com.livecode.array
25: public foreign handler MCArrayEvalKeysOf(in Target as Array, out Value as List) returns nothing binds to "<builtin>"
...
language-crucible/data/livecode/livecode/assert.lcb and every other .lcb file
has real public handler / private handler definitions with bodies
(... end handler).
Regex check (current func_start, gitgalaxy/standards/language_standards.py):
"public foreign handler MCArrayEvalKeysOf(...)" -> no match
"public handler MyHandler(in x as String)" -> no match
"private handler _helper()" -> no match
Handler-form breakdown in the corpus:
| form | count |
|---|---|
public foreign handler |
302 |
public handler |
80 |
foreign handler (bare + indented) |
42 |
handler (bare + indented) |
36 |
private handler |
11 |
foreign handler (341 of the 471) are FFI binding declarations
(... binds to "<builtin>"), C-prototype shaped with no body — arguably these
should not count as functions (parallel to how a C header prototype isn't a
definition). The other 130 (handler / public handler / private handler) are
real definitions with ... end handler bodies and clearly should.
Scope / design notes
.lcbhandlers use a parenthesized, typed parameter list
(handler Foo(in x as String, out y as Integer)), unlike LiveCode Script's
unparenthesizedcommand Foo pA, pB.func_start's current trailing lookahead
(?=[ \t\r\n]|--|//|#|/\*|$)deliberately rejectsname((see the
("function TargetFunc()", None)invalid case intest_livecode.py), so
supporting.lcbmeans a dedicated branch, not just adding a keyword.argsfor.lcbis a separate granularity question (typedin/out/inout
clauses vs. bare identifiers) — likely aproxy/dedicated-counter case like
ABAP's_count_abap_declared_params(detector.py: per-function args count wrong for ABAP -- wrong search span, wrong counting shape #1918).class_startalready handles.lcbcorrectly (module com.x.y, 33/33).
Found by
tri-comparison-ledger-sweep skill, livecode manual-verification pass
(2026-08-28). livecode is a gg_only language (no tree-sitter, no ctags), verified
by direct source cross-check.
Activity
feat(livecode): tri-comparison manual verification -- class precision…
fix(#2409,#2410): livecode func_start -- Mode D routing + LiveCode Bu…