HS: Group 11 misc — toggle-var-cycle, closest-to, tailwind class, toggle timing (+3 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 6m13s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 6m13s
- parser: `toggle $var between v1 and v2 ...` → `(toggle-var-cycle $var (v1 v2 ...))` - compiler: emit `(hs-toggle-var-cycle! win var-name values)` for new AST node - runtime: `hs-toggle-var-cycle!` cycles through a list of values on a variable - parser: `closest .sel to .target` / `closest #id to .target` / `closest sel to .target` now consumes the `to` keyword and parses the target expr instead of defaulting to beingTold - tokenizer: `read-class-name` handles backslash escapes and allows `(`, `)`, `&` chars so Tailwind classes like `group-[:nth-of-type(3)_&]:block` tokenize correctly - platform.py: `domListen` drives async result via `_driveAsync` after `cekCall` - test: fixed-time toggle asserts `.foo` IS present after click (toggle started, 10ms window open) - generate-sx-tests.py: aligned MANUAL_TEST_BODIES for timed toggle with corrected assertion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -469,7 +469,8 @@
|
||||
(= name "meta")
|
||||
(= name "event")
|
||||
(= name "it")
|
||||
(= name "result")))
|
||||
(= name "result"))))
|
||||
(define
|
||||
emit-for
|
||||
(fn
|
||||
(ast)
|
||||
@@ -1806,6 +1807,12 @@
|
||||
(if source (hs-to-sx source) (quote me))
|
||||
event-name)
|
||||
(list (quote hs-toggle-class!) tgt cls))))
|
||||
((= head (quote toggle-var-cycle))
|
||||
(list
|
||||
(quote hs-toggle-var-cycle!)
|
||||
(list (quote host-global) "window")
|
||||
(nth ast 1)
|
||||
(cons (quote list) (map hs-to-sx (nth ast 2)))))
|
||||
((= head (quote set-on))
|
||||
(list
|
||||
(quote hs-set-on!)
|
||||
|
||||
Reference in New Issue
Block a user