speckl/compiler
Marcus (agent-cos) 1cbad9d756 fix(compiler): translate Map/Set expression patterns to JavaScript (#18)
- x in someSet → someSet.has(x)
- x in someMap.keys → someMap.has(x)
- x notIn someMap.keys → !someMap.has(x)
- m[k] → m.get(k) for Map state variables
- s.size() → s.size (property, not method)
- Track Map-typed state variables via mapVarNames for accurate .get() translation
- Thread mapVarNames through emitAction and rewriteExpr

All 41 tests passing. TigerBeetleLedger now generates correct TypeScript
with .get() for Map access and .has() for Set membership.

Part of M0.1: Fix TS generator bugs (speckl#18)
2026-05-09 22:07:32 -07:00
..
__tests__ WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
dist fix(compiler): protect object literal identifiers from this. prefix in rewriteExpr 2026-05-09 20:06:36 -07:00
node_modules fix(compiler): translate Map/Set expression patterns to JavaScript (#18) 2026-05-09 22:07:32 -07:00
out/speckl-compile feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
specs feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
src fix(compiler): translate Map/Set expression patterns to JavaScript (#18) 2026-05-09 22:07:32 -07:00
test-output fix(compiler): translate Map/Set expression patterns to JavaScript (#18) 2026-05-09 22:07:32 -07:00
.gitignore Add .gitignore for compiler dependencies and build artifacts 2026-04-29 15:12:37 -07:00
.last-build fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
check-dist.sh fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
package-lock.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
package.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
tsconfig.json Add SpeckDL compiler scaffold 2026-04-29 15:12:08 -07:00