7d6df6fd5f
cl: Phase 3 conditions + restarts — handler-bind, handler-case, restart-case, 55 tests (123 total runtime)
...
define-condition with 15-type ANSI hierarchy (condition/error/warning/
simple-error/simple-warning/type-error/arithmetic-error/division-by-zero/
cell-error/unbound-variable/undefined-function/program-error/storage-condition).
cl-condition-of-type? walks the hierarchy; cl-make-condition builds tagged
dicts {:cl-type "cl-condition" :class name :slots {...}}. cl-signal-obj
walks cl-handler-stack for non-unwinding dispatch. cl-handler-case and
cl-restart-case use call/cc escape continuations for unwinding. All stacks
are mutable SX globals (the built-in handler-bind/restart-case only accept
literal AST specs — not computed lists). Key fix: cl-condition-of-type?
captures cl-condition-classes at define-time via let-closure to avoid
free-variable failure through env_merge parent chain.
55 tests in lib/common-lisp/tests/conditions.sx, wired into test.sh.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-05 11:14:04 +00:00
fd16776dd2
cl: unwind-protect — cleanup frame in cl-eval-ast, 8 new tests (159 eval)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-05 11:13:53 +00:00
a12a6a11cb
cl: tagbody + go — 11 new tests (151 eval, 323 total green)
...
Sentinel-based tagbody: cl-build-tag-map indexes tags by str-normalised key
(handles integer tags); cl-eval-tagbody loops with go-jump restart;
go-tag propagates through cl-eval-body alongside block-return.
2026-05-05 11:07:43 +00:00
ce7243a1fb
cl: block + return-from — 13 new tests (140 eval, 312 total green)
...
Sentinel propagation in cl-eval-body; cl-eval-block catches matching
sentinels; BLOCK/RETURN-FROM/RETURN dispatch added to cl-eval-list.
Parser: CL strings now {:cl-type "string"} dicts for proper CL semantics.
2026-05-05 10:57:33 +00:00
4da91bb9b4
cl: Phase 2 eval — 127 tests, 299 total green
...
Test, Build, and Deploy / test-build-deploy (push) Failing after 12s
lib/common-lisp/eval.sx: cl-eval-ast implementing quote, if, progn,
let/let*, flet, labels, setq/setf, function, lambda, the, locally,
eval-when, defun, defvar/defparameter/defconstant, built-in arithmetic
(+/-/*//, min/max/abs/evenp/oddp), comparisons, predicates, list ops,
string ops, funcall/apply/mapcar.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:58:48 +00:00
cdee007185
cl: Phase 1 lambda-list parser + 31 tests (172 total green)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:26:58 +00:00
bcf6057ac5
common-lisp: Phase 1 reader + 62 tests (141 total)
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
lib/common-lisp/parser.sx — cl-read/cl-read-all: lists, dotted
pairs (a . b) → cons dict, quote/backquote/unquote/splice as
wrapper lists, #' → FUNCTION, #(…) → vector dict, #:foo →
uninterned dict, NIL→nil, T→true, integer radix conversion
(#xFF/#b1010/#o17). Floats/ratios kept as annotated dicts.
lib/common-lisp/tests/parse.sx — 62 tests, all green.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:15:07 +00:00
13d0ebcce8
common-lisp: Phase 1 tokenizer + 79 tests
...
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
lib/common-lisp/reader.sx — CL tokenizer: symbols with package
qualification (pkg:sym/pkg::sym), integers, floats, ratios, hex/
binary/octal (#xFF/#b1010/#o17), strings with escapes, #\ char
literals (named + bare), reader macros (#' #( #: ,@), line and
nested block comments.
lib/common-lisp/tests/read.sx — 79 tests, all green.
lib/common-lisp/test.sh — test runner (sx_server pipe protocol).
Key SX gotcha: use str not concat for string building.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-25 18:06:30 +00:00