Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix calling of radcalc for radix literals; make them produce the righ…
…t type, I hope
  • Loading branch information
moritz committed Nov 11, 2011
1 parent 933a1a5 commit 3014678
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Perl6/Actions.pm
Expand Up @@ -3424,8 +3424,12 @@ class Perl6::Actions is HLL::Actions {
my $intpart := $<intpart>.Str;
my $fracpart := $<fracpart> ?? $<fracpart>.Str !! "0";
my $intfrac := $intpart ~ $fracpart; #the dot is a part of $fracpart, so no need for ~ "." ~
my $base := $<base> ?? +($<base>[0].Str) !! 0;
my $exp := $<exp> ?? +($<exp>[0].Str) !! 0;

# radcalc cares about undefined value vs. 0 for exp
my $base;
my $exp;
$base := +($<base>[0].Str) if $<base>;
$exp := +($<exp>[0].Str) if $<exp>;

my $error;
try {
Expand Down

0 comments on commit 3014678

Please sign in to comment.