Fix hyperscript conformance: 54/112 passing (was 31/81 baseline)
Runtime visibility fix: - eval-hs now injects runtime helpers (hs-add, hs-falsy?, hs-strict-eq, hs-type-check, hs-matches?, hs-contains?, hs-coerce) via outer let binding so the tree-walker evaluator can resolve them Parser fixes: - null/undefined: return (null-literal) AST node instead of bare nil (nil was indistinguishable from "no parse result" sentinel) - === / !== tokenized as single 3-char operators - mod operator: emit (modulo) instead of (%) — modulo is a real primitive Compiler fixes: - null-literal → nil - % → modulo - contains? → hs-contains? (avoids tree-walker primitive arity conflict) Runtime additions: - hs-contains?: wraps list membership + string containment Tokenizer: - Added keywords: a, an (removed — broke all tokenization), exist - Triple operators: === and !== now tokenized correctly Scorecard: 54/112 test groups passing, +23 from baseline. Unlocked: really-equals, english comparisons, is-in, null is empty, null exists, type checks, strict equality, mod. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -57,12 +57,10 @@
|
||||
(deftest
|
||||
"addition passes through"
|
||||
(let
|
||||
((sx (hs-to-sx-from-source "1 + 2")))
|
||||
(let
|
||||
((val (first sx)))
|
||||
(assert= (quote hs-add) (first val))
|
||||
(assert= 1 (nth val 1))
|
||||
(assert= 2 (nth val 2)))))
|
||||
((val (hs-to-sx-from-source "1 + 2")))
|
||||
(assert= (quote hs-add) (first val))
|
||||
(assert= 1 (nth val 1))
|
||||
(assert= 2 (nth val 2))))
|
||||
(deftest
|
||||
"comparison emits correctly"
|
||||
(let
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user