HS: extend parser/runtime + new node test runner; ignore test-results/

- Parser: `--` line comments, `|` op, `result` → `the-result`, query-scoped
  `<sel> in <expr>`, `is a/an <type>` predicate, multi-`as` chaining with `|`,
  `match`/`precede` keyword aliases, `[attr]` add/toggle, between attr forms
- Runtime: per-element listener registry + hs-deactivate!, attr toggle
  variants, set-inner-html boots subtree, hs-append polymorphic on
  string/list/element, default? / array-set! / query-all-in / list-set
  via take+drop, hs-script idempotence guard
- Integration: skip reserved (me/it/event/you/yourself) when collecting vars
- Tokenizer: emit `--` comments and `|` op
- Test framework + conformance runner updates; new tests/hs-run-filtered.js
  (single-process Node runner using OCaml VM step-limit to bound infinite
  loops); generate-sx-conformance-dev.py improvements
- mcp_tree.ml + run_tests.ml: harness extensions
- .gitignore: top-level test-results/ (Playwright artifacts)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 07:11:07 +00:00
parent b2ae80fb21
commit 0515295317
20 changed files with 15224 additions and 8120 deletions

View File

@@ -302,7 +302,7 @@
(let
((ast (hs-compile "if result is empty add .hidden end")))
(assert= (quote if) (first ast))
(assert= (list (quote empty?) (list (quote it))) (nth ast 1))))
(assert= (list (quote empty?) (quote the-result)) (nth ast 1))))
(deftest
"comparison is not"
(let
@@ -375,7 +375,7 @@
(let
((ast (hs-compile "call alert(\"hello\")")))
(assert= (quote call) (first ast))
(assert= "alert" (nth ast 1))
(assert= (list (quote ref) "alert") (nth ast 1))
(assert= "hello" (nth ast 2)))))
;; ── Full expressions (matching tokenizer conformance) ─────────────
@@ -462,7 +462,7 @@
"the as article skip"
(let
((ast (hs-compile "set the result to 5")))
(let ((tgt (nth ast 1))) (assert= (quote it) (first tgt))))))
(let ((tgt (nth ast 1))) (assert= (quote the-result) tgt)))))
(defsuite
"hs-parse-as-conversion"