/contextualizer.diff Secret
Created
February 1, 2013 18:54
Star
You must be signed in to star a gist
./viv -e '$(1)'
./viv -e '"$(1)"'
./viv -e '/$(1)/'
will behave similar...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { | |
| | <sigil> <index=.decint> [<?{ $*IN_DECL }> <.panic: "Cannot declare a numeric variable">]? | |
| # Note: $() can also parse as contextualizer in an expression; should have same effect | |
| | <sigil> <?before '<'> <postcircumfix> [<?{ $*IN_DECL }> <.panic: "Cannot declare a match variable">]? | |
| - | <sigil> <?before '('> <postcircumfix> [<?{ $*IN_DECL }> <.panic: "Cannot declare a contextualizer">]? | |
| + | :dba('contextualizer') <sigil> '(' ~ ')' <semilist> { $*LEFTSIGIL ||= $<sigil>.Str } <O(|%term)> [<?{ $*IN_DECL }> <.panic: "Cannot declare a contextualizer">]? | |
| | <sigil> <?{ $*IN_DECL }> | |
| | <?> { | |
| if $*QSIGIL { | |
| @@ -3190,9 +3190,6 @@ grammar P6 is STD { | |
| <O(|%term)> | |
| } | |
| - token circumfix:sigil | |
| - { :dba('contextualizer') <sigil> '(' ~ ')' <semilist> { $*LEFTSIGIL ||= $<sigil>.Str } <O(|%term)> } | |
| - | |
| token circumfix:sym<( )> | |
| { :dba('parenthesized expression') '(' ~ ')' <semilist> <O(|%term)> } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment