giles
9d3e54029a
js-on-sx: switch/case/default/break
Parser: jp-parse-switch-stmt + jp-parse-switch-cases + jp-parse-switch-body.
AST: (js-switch discr (("case" val body) ("default" nil body) ...)).
Transpile: wraps body in (call/cc (fn (__break__) ...)). Each case
clause becomes (when (or __matched__ (js-strict-eq discr val))
(set! __matched__ true) body). Fall-through works naturally via
__matched__. Default appended as (when (not __matched__) body).
363/365 unit (+6), 148/148 slice unchanged.
2026-04-23 21:04:22 +00:00
..
2026-04-23 19:42:16 +00:00
2026-04-23 19:42:16 +00:00
2026-04-23 19:42:16 +00:00
2026-04-23 20:27:19 +00:00
2026-04-23 21:04:22 +00:00
2026-04-23 20:58:24 +00:00
2026-04-23 20:27:19 +00:00
2026-04-23 20:08:46 +00:00
2026-04-23 20:08:46 +00:00
2026-04-23 21:04:22 +00:00
2026-04-23 21:04:22 +00:00