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__ | ||
| generators | ||
| index.d.ts | ||
| index.d.ts.map | ||
| index.js | ||
| index.js.map | ||
| parser.d.ts | ||
| parser.d.ts.map | ||
| parser.js | ||
| parser.js.map | ||