From 86cb4a7ec793902ae70508c3a2931fa66d361e39 Mon Sep 17 00:00:00 2001 From: Nick Logan Date: Tue, 8 Sep 2026 07:20:51 -0700 Subject: [PATCH] Backtrack explicitly across an optional namespace prefix The optional prefix ident matches the `url` of `url(...)`, and the rule only parses because it then backtracks to give the prefix up. That only works because a quantifier followed by whitespace in a rule is currently not ratcheted, which rakudo may change in the future. `?!` asks for the backtracking explicitly, so the rule keeps parsing either way. --- lib/CSS/Module/CSS3/Namespaces.rakumod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CSS/Module/CSS3/Namespaces.rakumod b/lib/CSS/Module/CSS3/Namespaces.rakumod index af6aa8f8..a6e36672 100644 --- a/lib/CSS/Module/CSS3/Namespaces.rakumod +++ b/lib/CSS/Module/CSS3/Namespaces.rakumod @@ -6,7 +6,7 @@ use v6; unit class CSS::Module::CSS3::Namespaces; -rule at-decl:sym {'@'(:i'namespace') ? [|] ';' } +rule at-decl:sym {'@'(:i'namespace') ?! [|] ';' } class Actions { use CSS::Grammar::Defs :CSSObject;