HS: parse-feat keyword-first guard — fix assert-throws for command-like scripts (+2 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
parse-feat true fallback now routes directly to parse-cmd-list when the first token is a keyword (e.g. "add - to"), so command-keyword scripts always produce parse errors rather than being treated as subtraction expressions. Non-keyword tokens (numbers, identifiers, paren-open) still try expression-first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3219,14 +3219,17 @@
|
||||
"worker plugin is not installed — see https://hyperscript.org/features/worker"))
|
||||
((= val "bind") (do (adv!) (parse-bind-feat)))
|
||||
(true
|
||||
(let
|
||||
((saved-p p))
|
||||
(if
|
||||
(= (tp-type) "keyword")
|
||||
(parse-cmd-list)
|
||||
(let
|
||||
((expr (guard (_e (true nil)) (parse-expr))))
|
||||
(if
|
||||
(and expr (at-end?))
|
||||
expr
|
||||
(do (set! p saved-p) (parse-cmd-list))))))))))
|
||||
((saved-p p))
|
||||
(let
|
||||
((expr (guard (_e (true nil)) (parse-expr))))
|
||||
(if
|
||||
(and expr (at-end?))
|
||||
expr
|
||||
(do (set! p saved-p) (parse-cmd-list)))))))))))
|
||||
(define
|
||||
coll-feats
|
||||
(fn
|
||||
|
||||
Reference in New Issue
Block a user