diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index 3a657199..3d88a560 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -1272,7 +1272,7 @@ (fn () (let - ((tgt (parse-expr))) + ((tgt (cond ((and (= (tp-type) "ident") (or (= (tp-val) "element") (= (tp-val) "global") (= (tp-val) "local"))) (do (adv!) (parse-expr))) (true (parse-expr))))) (cond ((match-kw "to") (let ((value (parse-expr))) (list (quote set!) tgt value))) diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index 3a657199..3d88a560 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -1272,7 +1272,7 @@ (fn () (let - ((tgt (parse-expr))) + ((tgt (cond ((and (= (tp-type) "ident") (or (= (tp-val) "element") (= (tp-val) "global") (= (tp-val) "local"))) (do (adv!) (parse-expr))) (true (parse-expr))))) (cond ((match-kw "to") (let ((value (parse-expr))) (list (quote set!) tgt value)))