Rebuild hyperscript WASM bytecode bundles (hs-*.sxbc + manifest)
Updates the pre-bundled HS tokenizer/parser/compiler/runtime/integration sx + sxbc pairs plus module-manifest.json in shared/static/wasm/sx/, matching the current HS source after recent patches (call command, event destructuring, halt/append, break/continue, CSS block syntax, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
(do
|
||||
(adv!)
|
||||
(list (make-symbol ".") (list (quote event)) "detail")))
|
||||
((and (= typ "keyword") (= val "my"))
|
||||
((and (= typ "keyword") (or (= val "my") (= val "your")))
|
||||
(do (adv!) (parse-poss-tail (list (quote me)))))
|
||||
((and (= typ "keyword") (= val "its"))
|
||||
(do (adv!) (parse-poss-tail (list (quote it)))))
|
||||
@@ -775,50 +775,88 @@
|
||||
parse-add-cmd
|
||||
(fn
|
||||
()
|
||||
(if
|
||||
(= (tp-type) "class")
|
||||
(let
|
||||
((cls (get (adv!) "value")) (extra-classes (list)))
|
||||
(define
|
||||
collect-classes!
|
||||
(fn
|
||||
()
|
||||
(when
|
||||
(= (tp-type) "class")
|
||||
(set!
|
||||
extra-classes
|
||||
(append extra-classes (list (get (adv!) "value"))))
|
||||
(collect-classes!))))
|
||||
(collect-classes!)
|
||||
(cond
|
||||
((= (tp-type) "class")
|
||||
(let
|
||||
((tgt (parse-tgt-kw "to" (list (quote me)))))
|
||||
((cls (get (adv!) "value")) (extra-classes (list)))
|
||||
(define
|
||||
collect-classes!
|
||||
(fn
|
||||
()
|
||||
(when
|
||||
(= (tp-type) "class")
|
||||
(set!
|
||||
extra-classes
|
||||
(append extra-classes (list (get (adv!) "value"))))
|
||||
(collect-classes!))))
|
||||
(collect-classes!)
|
||||
(let
|
||||
((when-clause (if (match-kw "when") (parse-expr) nil)))
|
||||
(if
|
||||
(empty? extra-classes)
|
||||
((tgt (if (match-kw "to") (parse-expr) (list (quote me)))))
|
||||
(let
|
||||
((when-clause (if (match-kw "when") (parse-expr) nil)))
|
||||
(if
|
||||
when-clause
|
||||
(list (quote add-class-when) cls tgt when-clause)
|
||||
(list (quote add-class) cls tgt))
|
||||
(if
|
||||
when-clause
|
||||
(list
|
||||
(quote multi-add-class-when)
|
||||
tgt
|
||||
(empty? extra-classes)
|
||||
(if
|
||||
when-clause
|
||||
cls
|
||||
extra-classes)
|
||||
(cons
|
||||
(quote multi-add-class)
|
||||
(cons tgt (cons cls extra-classes))))))))
|
||||
(let
|
||||
((value (parse-expr)))
|
||||
(if
|
||||
(match-kw "to")
|
||||
(list (quote add-class-when) cls tgt when-clause)
|
||||
(list (quote add-class) cls tgt))
|
||||
(if
|
||||
when-clause
|
||||
(list
|
||||
(quote multi-add-class-when)
|
||||
tgt
|
||||
when-clause
|
||||
cls
|
||||
extra-classes)
|
||||
(cons
|
||||
(quote multi-add-class)
|
||||
(cons tgt (cons cls extra-classes)))))))))
|
||||
((= (tp-type) "style")
|
||||
(let
|
||||
((prop (get (adv!) "value"))
|
||||
(value
|
||||
(if
|
||||
(= (tp-type) "local")
|
||||
(get (adv!) "value")
|
||||
(parse-expr))))
|
||||
(let
|
||||
((tgt (parse-expr)))
|
||||
(list (quote add-value) value tgt))
|
||||
nil)))))
|
||||
((tgt (if (match-kw "to") (parse-expr) (list (quote me)))))
|
||||
(list (quote set-style) prop value tgt))))
|
||||
((= (tp-type) "brace-open")
|
||||
(do
|
||||
(adv!)
|
||||
(let
|
||||
((pairs (list)))
|
||||
(define
|
||||
collect-pairs!
|
||||
(fn
|
||||
()
|
||||
(when
|
||||
(and
|
||||
(not (= (tp-type) "brace-close"))
|
||||
(not (at-end?)))
|
||||
(let
|
||||
((prop (get (adv!) "value")))
|
||||
(when (= (tp-type) "colon") (adv!))
|
||||
(let
|
||||
((val (tp-val)))
|
||||
(adv!)
|
||||
(set! pairs (cons (list prop val) pairs))
|
||||
(collect-pairs!))))))
|
||||
(collect-pairs!)
|
||||
(when (= (tp-type) "brace-close") (adv!))
|
||||
(let
|
||||
((tgt (if (match-kw "to") (parse-expr) (list (quote me)))))
|
||||
(list (quote set-styles) (reverse pairs) tgt)))))
|
||||
(true
|
||||
(let
|
||||
((value (parse-expr)))
|
||||
(if
|
||||
(match-kw "to")
|
||||
(let
|
||||
((tgt (parse-expr)))
|
||||
(list (quote add-value) value tgt))
|
||||
nil))))))
|
||||
(define
|
||||
parse-remove-cmd
|
||||
(fn
|
||||
@@ -923,40 +961,64 @@
|
||||
(list (quote toggle-class) cls tgt)))))
|
||||
((= (tp-type) "style")
|
||||
(let
|
||||
((prop (do (let ((v (tp-val))) (adv!) v))))
|
||||
(if
|
||||
(match-kw "between")
|
||||
(let
|
||||
((val1 (parse-atom)))
|
||||
(expect-kw! "and")
|
||||
((prop (get (adv!) "value")))
|
||||
(let
|
||||
((tgt (if (match-kw "of") (parse-expr) (list (quote me)))))
|
||||
(if
|
||||
(match-kw "between")
|
||||
(let
|
||||
((val2 (parse-atom)))
|
||||
((val1 (parse-atom)))
|
||||
(expect-kw! "and")
|
||||
(let
|
||||
((tgt (parse-tgt-kw "on" (list (quote me)))))
|
||||
(list (quote toggle-style-between) prop val1 val2 tgt))))
|
||||
(let
|
||||
((tgt (parse-tgt-kw "on" (list (quote me)))))
|
||||
((val2 (parse-atom)))
|
||||
(if
|
||||
(match-kw "and")
|
||||
(let
|
||||
((val3 (parse-atom)))
|
||||
(if
|
||||
(match-kw "and")
|
||||
(let
|
||||
((val4 (parse-atom)))
|
||||
(list
|
||||
(quote toggle-style-cycle)
|
||||
prop
|
||||
tgt
|
||||
val1
|
||||
val2
|
||||
val3
|
||||
val4))
|
||||
(list
|
||||
(quote toggle-style-cycle)
|
||||
prop
|
||||
tgt
|
||||
val1
|
||||
val2
|
||||
val3)))
|
||||
(list
|
||||
(quote toggle-style-between)
|
||||
prop
|
||||
val1
|
||||
val2
|
||||
tgt))))
|
||||
(list (quote toggle-style) prop tgt)))))
|
||||
((= (tp-type) "attr")
|
||||
(let
|
||||
((attr-name (do (let ((v (tp-val))) (adv!) v))))
|
||||
(if
|
||||
(match-kw "between")
|
||||
(let
|
||||
((val1 (parse-atom)))
|
||||
(expect-kw! "and")
|
||||
((attr-name (get (adv!) "value")))
|
||||
(let
|
||||
((tgt (if (match-kw "on") (parse-expr) (list (quote me)))))
|
||||
(if
|
||||
(match-kw "between")
|
||||
(let
|
||||
((val2 (parse-atom)))
|
||||
((val1 (parse-expr)))
|
||||
(expect-kw! "and")
|
||||
(let
|
||||
((tgt (parse-tgt-kw "on" (list (quote me)))))
|
||||
((val2 (parse-expr)))
|
||||
(list
|
||||
(quote toggle-attr-between)
|
||||
attr-name
|
||||
val1
|
||||
val2
|
||||
tgt))))
|
||||
(let
|
||||
((tgt (parse-tgt-kw "on" (list (quote me)))))
|
||||
tgt)))
|
||||
(list (quote toggle-attr) attr-name tgt)))))
|
||||
((and (= (tp-type) "keyword") (= (tp-val) "my"))
|
||||
(do
|
||||
@@ -1050,17 +1112,19 @@
|
||||
((match-kw "after")
|
||||
(list (quote put!) value "after" (parse-expr)))
|
||||
((match-kw "at")
|
||||
(cond
|
||||
((match-kw "start")
|
||||
(do
|
||||
(expect-kw! "of")
|
||||
(list (quote put!) value "start" (parse-expr))))
|
||||
((match-kw "end")
|
||||
(do
|
||||
(expect-kw! "of")
|
||||
(list (quote put!) value "end" (parse-expr))))
|
||||
(true
|
||||
(error (str "Expected start/end after at, position " p)))))
|
||||
(do
|
||||
(match-kw "the")
|
||||
(cond
|
||||
((match-kw "start")
|
||||
(do
|
||||
(expect-kw! "of")
|
||||
(list (quote put!) value "start" (parse-expr))))
|
||||
((match-kw "end")
|
||||
(do
|
||||
(expect-kw! "of")
|
||||
(list (quote put!) value "end" (parse-expr))))
|
||||
(true
|
||||
(error (str "Expected start/end after at, position " p))))))
|
||||
(true
|
||||
(error (str "Expected into/before/after/at at position " p)))))))
|
||||
(define
|
||||
@@ -1221,26 +1285,35 @@
|
||||
(fn
|
||||
()
|
||||
(let
|
||||
((prop (cond ((= (tp-type) "style") (get (adv!) "value")) ((= (tp-val) "my") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) (true (get (adv!) "value")))))
|
||||
((prop (cond ((= (tp-type) "style") (get (adv!) "value")) ((= (tp-val) "my") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) ((= (tp-val) "'s") (do (adv!) (if (= (tp-type) "style") (get (adv!) "value") (get (adv!) "value")))) (true (get (adv!) "value")))))
|
||||
(let
|
||||
((from-val (if (match-kw "from") (let ((v (parse-atom))) (if (and (number? v) (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
||||
(expect-kw! "to")
|
||||
((inner-tgt (if (match-kw "of") (parse-expr) nil)))
|
||||
(let
|
||||
((value (let ((v (parse-atom))) (if (and (number? v) (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v))))
|
||||
((eff-tgt (if inner-tgt inner-tgt tgt)))
|
||||
(let
|
||||
((dur (if (match-kw "over") (let ((v (parse-atom))) (if (and (number? v) (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
||||
((from-val (if (match-kw "from") (let ((v (parse-atom))) (if (and v (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
||||
(expect-kw! "to")
|
||||
(let
|
||||
((using-val (if (match-kw "using") (parse-expr) nil)))
|
||||
(if
|
||||
from-val
|
||||
(list
|
||||
(quote transition-from)
|
||||
prop
|
||||
from-val
|
||||
value
|
||||
dur
|
||||
tgt)
|
||||
(list (quote transition) prop value dur tgt)))))))))
|
||||
((value (let ((v (parse-atom))) (if (and v (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v))))
|
||||
(let
|
||||
((dur (if (match-kw "over") (let ((v (parse-atom))) (if (and (number? v) (= (tp-type) "ident") (not (hs-keyword? (tp-val)))) (let ((unit (get (adv!) "value"))) (list (quote string-postfix) v unit)) v)) nil)))
|
||||
(let
|
||||
((using-val (if (match-kw "using") (parse-expr) nil)))
|
||||
(if
|
||||
from-val
|
||||
(list
|
||||
(quote transition-from)
|
||||
prop
|
||||
from-val
|
||||
value
|
||||
dur
|
||||
eff-tgt)
|
||||
(list
|
||||
(quote transition)
|
||||
prop
|
||||
value
|
||||
dur
|
||||
eff-tgt)))))))))))
|
||||
(let
|
||||
((first-t (parse-one-transition)))
|
||||
(define
|
||||
@@ -1278,9 +1351,20 @@
|
||||
(let
|
||||
((mode (cond ((match-kw "forever") (list (quote forever))) ((match-kw "while") (list (quote while) (parse-expr))) ((match-kw "until") (list (quote until) (parse-expr))) (true (let ((n (parse-expr))) (if (match-kw "times") (list (quote times) n) (list (quote forever))))))))
|
||||
(let
|
||||
((body (parse-cmd-list)))
|
||||
(match-kw "end")
|
||||
(list (quote repeat) mode body)))))))
|
||||
((body (do (match-kw "then") (parse-cmd-list))))
|
||||
(cond
|
||||
((match-kw "until")
|
||||
(let
|
||||
((cond-expr (parse-expr)))
|
||||
(match-kw "end")
|
||||
(list (quote repeat-until) cond-expr body)))
|
||||
((match-kw "while")
|
||||
(let
|
||||
((cond-expr (parse-expr)))
|
||||
(match-kw "end")
|
||||
(list (quote repeat-while) cond-expr body)))
|
||||
(true
|
||||
(do (match-kw "end") (list (quote repeat) mode body))))))))))
|
||||
(define
|
||||
parse-fetch-cmd
|
||||
(fn
|
||||
@@ -1521,9 +1605,9 @@
|
||||
(let
|
||||
((collection (parse-expr)))
|
||||
(let
|
||||
((idx (if (match-kw "index") (let ((iname (tp-val))) (adv!) iname) nil)))
|
||||
((idx (cond ((match-kw "index") (let ((iname (tp-val))) (adv!) iname)) ((match-kw "indexed") (do (match-kw "by") (let ((iname (tp-val))) (adv!) iname))) (true nil))))
|
||||
(let
|
||||
((body (parse-cmd-list)))
|
||||
((body (do (match-kw "then") (parse-cmd-list))))
|
||||
(match-kw "end")
|
||||
(if
|
||||
idx
|
||||
@@ -1599,8 +1683,8 @@
|
||||
(fn
|
||||
()
|
||||
(let
|
||||
((the-event (and (match-kw "the") (or (match-kw "event") (match-kw "default")))))
|
||||
(list (quote halt!) (if the-event "event" "default")))))
|
||||
((mode (cond ((match-kw "the") (do (match-kw "event") (match-kw "'s") "event")) ((or (match-kw "default") (and (= (tp-val) "default") (do (adv!) true))) "default") ((or (match-kw "bubbling") (and (= (tp-val) "bubbling") (do (adv!) true))) "bubbling") (true "event"))))
|
||||
(list (quote halt!) mode))))
|
||||
(define
|
||||
parse-param-list
|
||||
(fn () (if (= (tp-type) "paren-open") (parse-call-args) (list))))
|
||||
@@ -1838,6 +1922,12 @@
|
||||
(do (adv!) (parse-open-cmd)))
|
||||
((and (= typ "keyword") (= val "close"))
|
||||
(do (adv!) (parse-close-cmd)))
|
||||
((and (= typ "keyword") (= val "break"))
|
||||
(do (adv!) (list (quote break))))
|
||||
((and (= typ "keyword") (= val "continue"))
|
||||
(do (adv!) (list (quote continue))))
|
||||
((and (= typ "keyword") (or (= val "exit") (= val "halt")))
|
||||
(do (adv!) (list (quote exit))))
|
||||
(true (parse-expr))))))
|
||||
(define
|
||||
parse-cmd-list
|
||||
|
||||
Reference in New Issue
Block a user