diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index cdc40b60..ac4cf828 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -2874,15 +2874,12 @@ (true (let ((expr (parse-expr))) - (if - (or - (= (first expr) (quote call)) - (= (first expr) (quote method-call))) - expr - (error - (str - "Invalid command — expected a function call, got: " - (str (first expr))))))))))) + (let + ((callable? (if (and (dict? expr) (get expr :hs-ast)) (= (get expr :kind) "call") (or (= (first expr) (quote call)) (= (first expr) (quote method-call)))))) + (if + (or callable? hs-span-mode) + expr + (error "Invalid command — expected a function call"))))))))) (define parse-cmd-list (fn