From 3725e264b9e08c9474a1e2acaa9712f43759ce85 Mon Sep 17 00:00:00 2001 From: Tobias Leich Date: Mon, 4 Feb 2013 08:34:50 +0100 Subject: [PATCH] move $( ~ ) into variable token This way contextualizers in code, quotes _and_ regexes behave the same. --- STD.pm6 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/STD.pm6 b/STD.pm6 index b644216..769948d 100644 --- a/STD.pm6 +++ b/STD.pm6 @@ -2472,7 +2472,7 @@ grammar P6 is STD { | [ <.panic: "Cannot declare a numeric variable">]? # Note: $() can also parse as contextualizer in an expression; should have same effect | [ <.panic: "Cannot declare a match variable">]? - | [ <.panic: "Cannot declare a contextualizer">]? + | :dba('contextualizer') '(' ~ ')' { $*LEFTSIGIL ||= $.Str } [ <.panic: "Cannot declare a contextualizer">]? | | { if $*QSIGIL { @@ -3190,9 +3190,6 @@ grammar P6 is STD { } - token circumfix:sigil - { :dba('contextualizer') '(' ~ ')' { $*LEFTSIGIL ||= $.Str } } - token circumfix:sym<( )> { :dba('parenthesized expression') '(' ~ ')' }