macro(ast-json): add Loop/Break/Continue to AST JSON v0; add loop_normalize_macro (MVP identity) and loopform smoke; docs update

This commit is contained in:
Selfhosting Dev
2025-09-19 22:47:12 +09:00
parent c55f9d3689
commit 9d40e9137a
4 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,13 @@
// loop_normalize_macro.nyash
// MVP: identity expansion with (json, ctx) signature.
// Next steps: normalize `loop(cond){ body }` into carrier-based LoopForm.
static box MacroBoxSpec {
static function name() { return "LoopNormalize" }
static function expand(json, ctx) {
// For MVP, return input unchanged.
return json
}
}