HS fixes: multi-property transition, take attr with-val, empty form, css-value parsing
- Parser: multi-property transition (width from 0px to 100px height from...) with collect-transitions loop. CSS value parsing uses parse-atom + manual number+unit concat to avoid greedy string-postfix chaining. - Compiler: take! passes attr-val and with-val (restored from revert) - Runtime: hs-empty-target! handles FORM by iterating child inputs, hs-starts-with-ic/hs-ends-with-ic for case-insensitive comparison Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1063,7 +1063,9 @@
|
||||
((kind (nth ast 1))
|
||||
(name (nth ast 2))
|
||||
(from-sel (if (> (len ast) 3) (nth ast 3) nil))
|
||||
(for-tgt (if (> (len ast) 4) (nth ast 4) nil)))
|
||||
(for-tgt (if (> (len ast) 4) (nth ast 4) nil))
|
||||
(attr-val (if (> (len ast) 5) (nth ast 5) nil))
|
||||
(with-val (if (> (len ast) 6) (nth ast 6) nil)))
|
||||
(let
|
||||
((target (if for-tgt (hs-to-sx for-tgt) (quote me)))
|
||||
(scope
|
||||
@@ -1072,7 +1074,17 @@
|
||||
((and (list? from-sel) (= (first from-sel) (quote query)))
|
||||
(list (quote hs-query-all) (nth from-sel 1)))
|
||||
(true (hs-to-sx from-sel)))))
|
||||
(list (quote hs-take!) target kind name scope))))
|
||||
(if
|
||||
(and (= kind "attr") (or attr-val with-val))
|
||||
(list
|
||||
(quote hs-take!)
|
||||
target
|
||||
kind
|
||||
name
|
||||
scope
|
||||
attr-val
|
||||
(if with-val (hs-to-sx with-val) nil))
|
||||
(list (quote hs-take!) target kind name scope)))))
|
||||
((= head (quote make)) (emit-make ast))
|
||||
((= head (quote install))
|
||||
(cons (quote hs-install) (map hs-to-sx (rest ast))))
|
||||
|
||||
Reference in New Issue
Block a user