- Every block now emits a C label (its id) before its code
- generateNextCode emits goto label; for back-edges (visited targets)
- _emitBranch delegates to generateCode (not generateOwnCode), so labels
are emitted consistently in both main and branch traversals
- generateCallWithError threads a shared visited set across all three
emitBranch calls, preventing duplicate label emission for shared blocks
- emitBranch skips roots already visited by previous roots in the same
branch (prevents spurious gotos from shared-block traversal)
- Create codegen/index.js with pure branchDescendants, emitBranch,
generateCallWithError, and generateCFile — zero DOM dependencies
- blocks-proc.js adapters delegate to CodeGen with browser instanceof check
- run.js uses the same CodeGen module instead of duplicating block classes
with their own branchDescendants/emitBranch logic
- Load codegen/index.js in browser before blocks-proc.js
- Add gcc and mesa to shell.nix for C compilation
- Fix warning icon overlap with ::after message by adding padding-right
to proccall-header and end-header when warnings are active
- Add tests/compile/ with Makefile (pkg-config based) and run.js
which generates C source from block-like data structures, then
compiles with gcc -Wall -Wextra -fsyntax-only
- Tests cover: console template, simple error, error merge,
sequential errors, value-return error style
- Default colour now checks dataset.exitError instead of tagName === 'WC-END',
so success (exit 0) END blocks default to blue, error END blocks to red
- _selectByCode now also sets the HTML value attribute via setAttribute(),
ensuring cloneNode(true) preserves the formatted display value
- Add 4 regression tests for colour defaults, attribute sync, and clone value
- Replace if/else wrapping in WCProcCall.generateOwnCode with branch-aware
generation via _branchDescendants, _emitBranch, and _generateCallWithError
- Shared blocks (reachable from both error and success paths) now appear
only once after the if-block, avoiding deeply nested code
- Add 8 browser tests covering merge, decision passthrough, value style,
sequential calls, and shared-only error paths
- Increase template block spacing (16px -> 40px) for readability
- Add error WCEnd blocks to console and SDL3 templates with error-hook
connections to all failure-mode proc calls
- Hide editable WCProcCall input fields behind field-display spans,
matching existing algorithm-block convention