HS transition parser: handle *prop of target, possessive 's, inner targets
Parser: - After parsing transition property, check for "of <expr>" inner target - Handle possessive 's token before property name in parse-one-transition - Inner target overrides outer target when present Fixes 6 transition parse errors: *width of #foo, #foo's width, query ref with of/possessive syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1259,7 +1259,11 @@
|
|||||||
(fn
|
(fn
|
||||||
()
|
()
|
||||||
(let
|
(let
|
||||||
((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")))))
|
((prop (cond ((= (tp-type) "style") (get (adv!) "value")) ((= (tp-val) "my") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) ((= (tp-val) "'s") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) (true (get (adv!) "value")))))
|
||||||
|
(let
|
||||||
|
((inner-tgt (if (match-kw "of") (parse-expr) nil)))
|
||||||
|
(let
|
||||||
|
((eff-tgt (if inner-tgt inner-tgt tgt)))
|
||||||
(let
|
(let
|
||||||
((from-val (if (match-kw "from") (let ((v (parse-atom))) (if (and v (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
((from-val (if (match-kw "from") (let ((v (parse-atom))) (if (and v (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
||||||
(expect-kw! "to")
|
(expect-kw! "to")
|
||||||
@@ -1277,8 +1281,13 @@
|
|||||||
from-val
|
from-val
|
||||||
value
|
value
|
||||||
dur
|
dur
|
||||||
tgt)
|
eff-tgt)
|
||||||
(list (quote transition) prop value dur tgt)))))))))
|
(list
|
||||||
|
(quote transition)
|
||||||
|
prop
|
||||||
|
value
|
||||||
|
dur
|
||||||
|
eff-tgt)))))))))))
|
||||||
(let
|
(let
|
||||||
((first-t (parse-one-transition)))
|
((first-t (parse-one-transition)))
|
||||||
(define
|
(define
|
||||||
|
|||||||
Reference in New Issue
Block a user