HS: add {prop: value; ...} CSS block syntax in add command
Parser: - Handle brace-open token in parse-add-cmd - Parse colon-separated property:value pairs until brace-close - Produces (set-styles ((prop val) ...) target) Compiler: - set-styles → (do (dom-set-style target prop1 val1) ...) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -856,6 +856,16 @@
|
||||
(hs-to-sx (nth ast 3))
|
||||
(nth ast 1)
|
||||
(nth ast 2)))
|
||||
((= head (quote set-styles))
|
||||
(let
|
||||
((pairs (nth ast 1)) (tgt (hs-to-sx (nth ast 2))))
|
||||
(cons
|
||||
(quote do)
|
||||
(map
|
||||
(fn
|
||||
(p)
|
||||
(list (quote dom-set-style) tgt (first p) (nth p 1)))
|
||||
pairs))))
|
||||
((= head (quote multi-add-class))
|
||||
(let
|
||||
((target (hs-to-sx (nth ast 1)))
|
||||
|
||||
Reference in New Issue
Block a user