diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index be58d2b6..d1413bbd 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -3133,7 +3133,19 @@ acc (let ((feat (parse-feat))) - (if (nil? feat) acc (coll-feats (append acc (list feat)))))))) + (if + (nil? feat) + (if + (at-end?) + acc + (error + (str + "Parse error: Unexpected token '" + (tp-val) + "' (line " + (get (nth tokens p) "line") + ")"))) + (coll-feats (append acc (list feat)))))))) (let ((features (coll-feats (list)))) (if diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index be58d2b6..d1413bbd 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -3133,7 +3133,19 @@ acc (let ((feat (parse-feat))) - (if (nil? feat) acc (coll-feats (append acc (list feat)))))))) + (if + (nil? feat) + (if + (at-end?) + acc + (error + (str + "Parse error: Unexpected token '" + (tp-val) + "' (line " + (get (nth tokens p) "line") + ")"))) + (coll-feats (append acc (list feat)))))))) (let ((features (coll-feats (list)))) (if