Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move $( ~ ) into variable token

This way contextualizers in code, quotes _and_ regexes behave the same.
  • Loading branch information...
commit 3725e264b9e08c9474a1e2acaa9712f43759ce85 1 parent a8bc48f
@FROGGS FROGGS authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 STD.pm6
View
5 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)> }
Please sign in to comment.
Something went wrong with that request. Please try again.