HS: fix CSS dict semicolon parsing in add command (+1)

collect-pairs! in parse-add-cmd now skips the semicolon op token
between CSS properties, so add {color: red; font-family: monospace}
compiles to two dom-set-style calls instead of three malformed ones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 21:31:42 +00:00
parent 87072e61c1
commit 606b5da1a1
2 changed files with 6 additions and 0 deletions

View File

@@ -1046,6 +1046,9 @@
(let
((val (if (and (= (tp-type) "ident") (= (tp-val) "$")) (do (adv!) (when (= (tp-type) "brace-open") (adv!)) (if (= (tp-type) "brace-close") (do (adv!) (if (= (tp-type) "brace-open") (do (adv!) (let ((inner (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) inner)) "")) (let ((expr (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) expr))) (get (adv!) "value"))))
(set! pairs (cons (list prop val) pairs))
(when
(and (= (tp-type) "op") (= (tp-val) ";"))
(adv!))
(collect-pairs!))))))
(collect-pairs!)
(when (= (tp-type) "brace-close") (adv!))