Skip to content
Browse files

Checking for $@ and $^X should use <!before \w> instead of <?before \…

…W> so it works at string end (fixes #63)
  • Loading branch information...
1 parent ccb1914 commit 191508a41878952124faea9f5dfd08fea67946dd @sorear committed Nov 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/STD.pm6
View
4 src/STD.pm6
@@ -2084,7 +2084,7 @@ grammar P6 is STD {
}
token special_variable:sym<$@> {
- <sym> <?before \W> ::
+ <sym> <!before \w> ::
<.obs('$@ variable as eval error', '$!')>
}
@@ -2106,7 +2106,7 @@ grammar P6 is STD {
# Note: this works because placeholders are restricted to lowercase
token special_variable:sym<$^X> {
- <sigil> '^' $<letter> = [<[A..Z]>] \W
+ <sigil> '^' $<letter> = [<[A..Z]>] <![\w]>
<.obscaret($<sigil>.Str ~ '^' ~ $<letter>.Str, $<sigil>.Str, $<letter>.Str)>
}

0 comments on commit 191508a

Please sign in to comment.
Something went wrong with that request. Please try again.