Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created February 1, 2013 18:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save FROGGS/c41d6fa169557a17e798 to your computer and use it in GitHub Desktop.
./viv -e '$(1)' ./viv -e '"$(1)"' ./viv -e '/$(1)/' will behave similar...
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