The .kry -> Kir parser is now a shared library (cmd/kir/kir_parse.c +
kir_parse.h) exposing kir_parse_file(path, root) -> KirProgram*. Both k2c
(the C backend) and k2b (the krb backend) can link it to share one frontend.
k2ir/main.c is now a thin wrapper: parse + KirProgramDump to a .kir file.
The output path uses the module's source_path to preserve directory structure.
k2ir_test passes; make test green. The k2c backend (Stage 2) can now link
kir_parse.c to get Kir input.
Add KirAppMeta to KirModule (has_app, title, dimensions, fps, theme,
dark_mode, font_examples, frame/init/scene/shutdown hooks). The k2ir frontend
gains an APP mode that parses the app{} block's properties, and the dump
prints the metadata. This is needed by the future k2c backend to generate
main() (hook-driven / scene-tree / single-screen variants).
The k2ir frontend now joins physical lines into logical lines while ()/[]
depth > 0 or a string is open, so multi-line widget calls like
Button((ButtonProps){
.bounds = ...,
.label = ...,
})
become one classified statement. Braces at paren depth 0 are NOT join
triggers (block openers end the line). A pending buffer accumulates, a
static copy is dispatched, and pending is reset before the dispatch (so
mode-dispatch 'continue' paths are safe).
Also: classify mutations (count++) as EXPR not UNKNOWN, and initialize the
pending buffer (was uninitialized — strncat found garbage null bytes).
Verified: k2ir test passes; multi-line Button calls join correctly; make test
green.
The classify_stmt heuristic missed bare mutations like 'count++' / 'count--'
(no ':=', '=', or '(' tokens). Extend the EXPR match to include '+'/'-' so
post/pre-increment classify correctly. The k2ir frontend still needs
multi-line statement joining for real-world .kry (the next increment).