From 5e0fcb9316d0f854ccb06f2d55c4b11730294d8e Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 6 May 2026 09:59:09 +0000 Subject: [PATCH] tcl: tick Phase 4 checkboxes, update progress log Co-Authored-By: Claude Sonnet 4.6 --- plans/tcl-on-sx.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plans/tcl-on-sx.md b/plans/tcl-on-sx.md index b2e64e10..fad036d5 100644 --- a/plans/tcl-on-sx.md +++ b/plans/tcl-on-sx.md @@ -90,13 +90,13 @@ Core mapping: - [x] `lib/tcl/conformance.sh` + runner, `scoreboard.json` + `scoreboard.md` ### Phase 4 — control flow + error handling -- [ ] `return -code (ok|error|return|break|continue|N) -errorinfo … -errorcode … -level N value` -- [ ] `catch script ?resultVar? ?optionsVar?` — runs script, returns code; sets resultVar to return value/message; optionsVar to the dict -- [ ] `try script ?on code var body ...? ?trap pattern var body...? ?finally body?` -- [ ] `throw type message` -- [ ] `error message ?info? ?code?` -- [ ] Stack-trace with `errorInfo` / `errorCode` -- [ ] 30+ tests in `lib/tcl/tests/error.sx` +- [x] `return -code (ok|error|return|break|continue|N) -errorinfo … -errorcode … -level N value` +- [x] `catch script ?resultVar? ?optionsVar?` — runs script, returns code; sets resultVar to return value/message; optionsVar to the dict +- [x] `try script ?on code var body ...? ?trap pattern var body...? ?finally body?` +- [x] `throw type message` +- [x] `error message ?info? ?code?` +- [x] Stack-trace with `errorInfo` / `errorCode` +- [x] 30+ tests in `lib/tcl/tests/error.sx` ### Phase 5 — namespaces + ensembles - [ ] `namespace eval ns body`, `namespace current`, `namespace which`, `namespace import`, `namespace export`, `namespace forget`, `namespace delete` @@ -120,6 +120,7 @@ Core mapping: _Newest first._ +- 2026-05-06: Phase 4 error handling — catch/try/throw/return-code/errorinfo/errorcode, 267 tests green (39 new error tests) - 2026-05-06: Phase 3 conformance.sh + classic programs — 3/3 PASS (for-each-line/assert/with-temp-var), 228 tests green - 2026-05-06: Phase 3 proc+uplevel+upvar+info+global — frame stack, isolated proc scope, alias-following var access, 225 tests green (67 parse + 158 eval) - 2026-05-06: Phase 2 dict commands — 13 subcommands (create/get/set/unset/exists/keys/values/size/for/update/merge/incr/append), 206 tests green (67 parse + 139 eval)