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.
This commit is contained in:
2026-05-05 10:57:33 +00:00
parent 3f8fe41d4d
commit ce7243a1fb
4 changed files with 76 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
;;
;; AST representation:
;; integer/float → SX number (or {:cl-type "float"/:ratio ...})
;; string SX string
;; string "hello"{:cl-type "string" :value "hello"}
;; symbol FOO → SX string "FOO" (upcase)
;; symbol NIL → nil
;; symbol T → true
@@ -96,7 +96,7 @@
((= type "integer") {:form (cl-convert-integer val) :rest nxt})
((= type "float") {:form {:cl-type "float" :value val} :rest nxt})
((= type "ratio") {:form {:cl-type "ratio" :value val} :rest nxt})
((= type "string") {:form val :rest nxt})
((= type "string") {:form {:cl-type "string" :value val} :rest nxt})
((= type "char") {:form {:cl-type "char" :value val} :rest nxt})
((= type "keyword") {:form {:cl-type "keyword" :name val} :rest nxt})
((= type "uninterned") {:form {:cl-type "uninterned" :name val} :rest nxt})