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>
16 KiB
16 KiB