From 49317167da66f89c7f2c2dcc7a44cd2848954d9f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Apr 2026 17:47:09 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20future-work.md=20=E2=80=94=20document?= =?UTF-8?q?=20all=20new=20additions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Covers struct literals, match, for loops, semicolons, inline asm {var} substitution, raw asm, poke/peek intrinsics, and the new --memory-map / --call-graph flags. https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3 --- docs/future-work.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/future-work.md b/docs/future-work.md index 8ddc6fd..e351f88 100644 --- a/docs/future-work.md +++ b/docs/future-work.md @@ -459,6 +459,32 @@ These items were documented as future work but have since been implemented: weren't in `var_addrs` so callees read temp slots instead of parameters. Both bugs are now fixed with an integration test guard. +- **Struct literal syntax** — `Vec2 { x: 100, y: 50 }` in both + variable initializers and assignments. Desugars in lowering to + per-field stores. Restricted to non-condition expression contexts + (if/while/for conditions) to avoid ambiguity with block `{`. +- **Match statement** — `match x { pat => body, _ => default }` + parses to an if/else-if chain at parse time, so no new AST + variant is needed. Supports any expression patterns and an + underscore catch-all. +- **For loops** — `for i in start..end { body }` (half-open range). + Desugars in IR lowering to a while loop with a proper + continue-edge block. +- **Semicolon statement separators** — short statements can share + a line: `a += 1; b += 2`. +- **Inline asm `{var}` substitution** — inside an `asm { ... }` + block, `{name}` is replaced with the hex address of the variable + `name`. The lexer balances nested braces so `{counter}` inside + an asm body is captured correctly. +- **`raw asm { ... }` blocks** — variant of inline asm that skips + `{var}` substitution, passing the body through verbatim. +- **`poke(addr, value)` / `peek(addr)` intrinsics** — hardware + register access without needing an asm block. Compile to a + single LDA/STA against a compile-time-constant address. +- **`--memory-map` CLI flag** — prints a human-readable variable + allocation table showing what's in ZP vs main RAM. +- **`--call-graph` CLI flag** — prints a call-tree view with max + depth reached from each entry point handler. ### Remaining priority order