Parser fixes: - Fixed multiline state/init block parsing: trailing commas no longer treated as continuation markers, merging all state vars into one - Added splitFields() function for comma-aware emit field splitting that respects parenthesized groups and quoted strings - Fixed interface block parsing: enum-style interfaces (name-only values like 'Idle, Parsing, Parsed, ...') now correctly parsed as methods instead of being skipped (methods.length was 0) TypeScript generator fixes: - String[] array type syntax now correctly maps to string[] in output - collectIdents filters out names containing brackets - Duplicate event interfaces deduplicated (implicit emit events filtered when explicit events already declare them) - join(X, Y) translates to X + Y (string concatenation) instead of X.join(Y) which is wrong for string args - now() generates new Date().toISOString() instead of Date.now() to match String/string type annotations - decisionLog type uses proper union: (A | B | C)[] instead of A[] - String literals protected from this.-prefixing during identifier replacement (fixes 'leader' inside quotes becoming 'this.leader') - Removed debug console.log from enum generation Both TigerBeetleLedger.speck and speckl-compile.speckdl now generate TypeScript that passes tsc --noEmit with zero errors. Closes #9 |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| dist | ||
| node_modules | ||
| out/speckl-compile | ||
| specs | ||
| src | ||
| test-output | ||
| test-output-rust/TigerBeetleLedger | ||
| .gitignore | ||
| .last-build | ||
| check-dist.sh | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||