mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
No description
Parser extensions: - Function declarations with params and return types (fun, inline fun) - Array type syntax (u8[16]), array literal expressions ([1, 2, 3]) - fast/slow variable placement hints - Functions stored in Program AST IR module (new): - IrProgram, IrFunction, IrBasicBlock, IrOp, IrTerminator types - AST-to-IR lowering pass with: - Expression lowering to virtual temps - Control flow (if/else, while, loop) to basic blocks with branches - Break/continue via loop context stack - Short-circuit logical and/or - Button reads, draw sprites, wait_frame - Constants inlined as LoadImm - State handlers lowered as separate IR functions Tests: 6 new parser tests, 11 new IR lowering tests (153 total) https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3 |
||
|---|---|---|
| .github/workflows | ||
| examples | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| plan.md | ||
| spec.md | ||