lua: multi-return + unpack at call sites (+10 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 17:10:52 +00:00
parent 8bfeff8623
commit 2b448d99bc
4 changed files with 187 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ Each item: implement → tests → tick box → update progress log.
### Phase 3 — tables + functions + first PUC-Rio slice
- [x] `function` (anon, local, top-level), closures
- [ ] Multi-return: return as list, unpack at call sites
- [x] Multi-return: return as list, unpack at call sites
- [ ] Table constructors (array + hash + computed keys)
- [ ] Raw table access `t.k` / `t[k]` (no metatables yet)
- [ ] Vendor PUC-Rio 5.1.5 suite to `lib/lua/lua-tests/` (just `.lua` files)
@@ -82,6 +82,7 @@ Each item: implement → tests → tick box → update progress log.
_Newest first. Agent appends on every commit._
- 2026-04-24: lua: multi-return — `lua-multi` tagged value, `lua-first`/`lua-nth-ret`/`lua-pack-return` runtime, tail-position spread in return/local/assign. 185 total tests.
- 2026-04-24: lua: phase 3 — functions (anon/local/top-level) + closures verified (lexical capture, mutation-through-closure, recursion, HOFs). 175 total tests.
- 2026-04-24: lua: phase 2 transpile — arithmetic, comparison, short-circuit logical, `..` concat, if/while/repeat/for-num/local/assign. 157 total tests green.
- 2026-04-24: lua: parser (exprs with precedence, all phase-1 statements, funcbody, table ctors, method/chained calls) — 112 total tokenizer+parser tests