HS: on EVENT from SRC or EVENT from SRC multi-source listener (+1 test)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

Parser: limit `from SOURCE` to parse-collection/cmp/arith/poss/atom
  (stops before parse-logical so `or` is not consumed as binary op),
  then collect `or EVENT from SOURCE` pairs via recursive collect-ors!.
  Adds :or-sources key to the on-feature parts list.

Compiler: scan-on gains or-sources param (11th); new :or-sources cond
  clause extracts the list; terminal `true` branch wraps on-call in
  (do on-call (hs-on target event handler) ...) for each extra source.

Test: "can handle an or after a from clause" moved from skip-list to
  MANUAL_TEST_BODIES and now passes (1478/1496).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-06 15:17:22 +00:00
parent 9f57234d1e
commit f1428009fd
4 changed files with 117 additions and 22 deletions

View File

@@ -9448,7 +9448,21 @@
(hs-activate! _el-d1)
))
(deftest "can handle an or after a from clause"
(error "SKIP (skip-list): can handle an or after a from clause"))
(hs-cleanup!)
(let ((_d1 (dom-create-element "div"))
(_d2 (dom-create-element "div"))
(_el (dom-create-element "div")))
(dom-set-attr _d1 "id" "d1")
(dom-set-attr _d2 "id" "d2")
(dom-set-attr _el "_" "on click from #d1 or click from #d2 increment @count then put @count into me")
(dom-append (dom-body) _d1)
(dom-append (dom-body) _d2)
(dom-append (dom-body) _el)
(hs-activate! _el)
(dom-dispatch _d1 "click" nil)
(dom-dispatch _d2 "click" nil)
(assert= (dom-text-content _el) "2"))
)
(deftest "can have a simple event filter"
(hs-cleanup!)
(let ((_el-d1 (dom-create-element "div")))