Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
get :16<DEAD_BEEF> style literals working
  • Loading branch information
moritz committed Jul 14, 2011
1 parent 09a43b7 commit e939a8b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Perl6/Actions.pm
Expand Up @@ -2715,6 +2715,7 @@ class Perl6::Actions is HLL::Actions {
method rad_number($/) {
my $radix := +($<radix>.Str);
if $<circumfix> {
pir::die('NYI form of number litereal encountered');
make PAST::Op.new(:name('&radcalc'), :pasttype('call'),
$radix, $<circumfix>.ast);
} else {
Expand All @@ -2724,9 +2725,7 @@ class Perl6::Actions is HLL::Actions {
my $base := $<base> ?? +($<base>[0].Str) !! 0;
my $exp := $<exp> ?? +($<exp>[0].Str) !! 0;

make PAST::Op.new( :name('&radcalc'), :pasttype('call'),
$radix, $intfrac, $base, $exp
);
make radcalc($radix, $intfrac, $base, $exp);
}
}

Expand Down Expand Up @@ -3489,7 +3488,7 @@ class Perl6::Actions is HLL::Actions {
$past
}
}

sub strip_trailing_zeros(str $n) {
return $n if pir::index($n, '.') < 0;
while pir::index('_0',nqp::substr($n, -1)) >= 0 {
Expand Down

0 comments on commit e939a8b

Please sign in to comment.