From 24021748d20a756206f5df60d958ce6fd0dd8c5c Mon Sep 17 00:00:00 2001 From: Nick Logan Date: Tue, 8 Sep 2026 07:20:51 -0700 Subject: [PATCH] Fall back to any-args when an expr does not reach the closing paren In `[ ? || ]` the first branch always succeeds, so any- args is only reached by backtracking into the alternation once the ')' fails. That only works because an alternation followed by whitespace in a rule is currently not ratcheted, which rakudo may change in the future. Requiring the ')' after the expr keeps the fallback reachable either way. --- lib/CSS/Grammar/CSS21.rakumod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CSS/Grammar/CSS21.rakumod b/lib/CSS/Grammar/CSS21.rakumod index 0c6a009..0158fd7 100644 --- a/lib/CSS/Grammar/CSS21.rakumod +++ b/lib/CSS/Grammar/CSS21.rakumod @@ -93,7 +93,7 @@ rule pseudo:sym {':'[|| {':' } -rule any-function {'(' [ ? || ] ')'} +rule any-function {'(' [ ? || ] ')'} proto rule pseudo-function {*} rule pseudo-function:sym {:i'lang(' [ || ] ')'}