HS: append command, list stringify as comma-separated
Compiler: - append to symbol → (set! target (hs-append target value)) - append to DOM → (hs-append! value target) Runtime: - hs-append: pure function for string concat and list append - hs-append!: DOM insertAdjacentHTML for element targets Mock DOM: - dom_stringify handles List by joining elements with commas (matching JS Array.toString() behavior) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1143,10 +1143,13 @@
|
||||
((= head (quote go))
|
||||
(list (quote hs-navigate!) (hs-to-sx (nth ast 1))))
|
||||
((= head (quote append!))
|
||||
(list
|
||||
(quote dom-append)
|
||||
(hs-to-sx (nth ast 2))
|
||||
(hs-to-sx (nth ast 1))))
|
||||
(let
|
||||
((tgt (hs-to-sx (nth ast 2)))
|
||||
(val (hs-to-sx (nth ast 1))))
|
||||
(if
|
||||
(symbol? tgt)
|
||||
(list (quote set!) tgt (list (quote hs-append) tgt val))
|
||||
(list (quote hs-append!) val tgt))))
|
||||
((= head (quote tell))
|
||||
(let
|
||||
((tgt (hs-to-sx (nth ast 1))))
|
||||
|
||||
Reference in New Issue
Block a user