Hyperscript: remove/tell/transition commands, test generator ref() fix
Parser: remove me/[@attr]/{css}, tell body scoping (skip then),
transition from/to syntax + my/style prefixes.
Compiler: remove-element, remove-attr, remove-css, transition-from.
Runtime: hs-transition-from for from/to CSS transitions.
Generator changes (already committed) fix ref() unnamed-first mapping,
assertion dedup for pre/post pairs, on-event then insertion.
Conformance: 374→395 (+21 tests, 48%)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1011,18 +1011,21 @@
|
||||
(fn
|
||||
()
|
||||
(let
|
||||
((prop (get (adv!) "value")))
|
||||
(expect-kw! "to")
|
||||
((prop (cond ((= (tp-type) "style") (get (adv!) "value")) ((= (tp-val) "my") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) (true (get (adv!) "value")))))
|
||||
(let
|
||||
((value (parse-expr)))
|
||||
((from-val (if (match-kw "from") (parse-expr) nil)))
|
||||
(expect-kw! "to")
|
||||
(let
|
||||
((dur (if (match-kw "over") (if (= (tp-type) "number") (parse-dur (get (adv!) "value")) 400) nil)))
|
||||
((value (parse-expr)))
|
||||
(let
|
||||
((tgt (parse-tgt-kw "on" (list (quote me)))))
|
||||
((dur (if (match-kw "over") (parse-expr) nil)))
|
||||
(if
|
||||
dur
|
||||
(list (quote transition) prop value dur tgt)
|
||||
(list (quote transition) prop value tgt))))))))
|
||||
from-val
|
||||
(list (quote transition-from) prop from-val value dur)
|
||||
(if
|
||||
dur
|
||||
(list (quote transition) prop value dur nil)
|
||||
(list (quote transition) prop value nil)))))))))
|
||||
(define
|
||||
parse-repeat-cmd
|
||||
(fn
|
||||
|
||||
Reference in New Issue
Block a user