HS toggle style: parse between/cycle, runtime, mock style dict
Parser: - Reorder toggle style parsing: target before between clause - Handle "indexed" keyword, "indexed by" syntax - Use parse-atom (not parse-expr) for between values to avoid consuming "and" as boolean operator - Support 3-4 value cycles via toggle-style-cycle Compiler: - Add toggle-style-cycle dispatch → hs-toggle-style-cycle! Runtime: - Add hs-toggle-style-between! (2-value toggle) - Add hs-toggle-style-cycle! (N-value round-robin) Mock DOM: - Parse CSS strings from setAttribute "style" into style sub-dict so dom-get-style/dom-set-style work correctly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1008,6 +1008,14 @@
|
||||
(nth ast 1)
|
||||
(hs-to-sx (nth ast 2))
|
||||
(hs-to-sx (nth ast 3))))
|
||||
((= head (quote toggle-style-cycle))
|
||||
(list
|
||||
(quote hs-toggle-style-cycle!)
|
||||
(hs-to-sx (nth ast 2))
|
||||
(nth ast 1)
|
||||
(cons
|
||||
(quote list)
|
||||
(map hs-to-sx (slice ast 3 (len ast))))))
|
||||
((= head (quote toggle-attr))
|
||||
(list
|
||||
(quote hs-toggle-attr!)
|
||||
|
||||
Reference in New Issue
Block a user