Skip to content

Commit

Permalink
Handle Nd's in ${} special variables
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Jan 6, 2017
1 parent dd5759b commit eba3fe0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -2034,7 +2034,10 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
my $sigil := $<sigil>.Str;
my $text := $<text>.Str;
my $bad := $sigil ~ '{' ~ $text ~ '}';
$text := $text - 1 if $text ~~ /^\d+$/ && $text > 0;
if $text ~~ /^\d+$/ {
$text := nqp::radix(10, $text, 0, 0)[0];
$text := $text - 1 if $text > 0;
}
if $sigil ne '$' && $sigil ne '@' {
False; # not likely a P5ism
}
Expand Down

0 comments on commit eba3fe0

Please sign in to comment.