Skip to content

Commit

Permalink
fix radcalc, generate errors with line numbers, run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 9, 2011
1 parent c0ac660 commit c61a8d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/Perl6/Actions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3002,7 +3002,12 @@ class Perl6::Actions is HLL::Actions {
my $base := $<base> ?? +($<base>[0].Str) !! 0;
my $exp := $<exp> ?? +($<exp>[0].Str) !! 0;

make radcalc($radix, $intfrac, $base, $exp);
my $error;
try {
make radcalc($radix, $intfrac, $base, $exp);
CATCH { $error := $_ }
}
$/.CURSOR.panic($error) if pir::defined($error);
}
}

Expand Down Expand Up @@ -3832,7 +3837,7 @@ class Perl6::Actions is HLL::Actions {
my int $seen_dot := 0;
while $idx < nqp::chars($number) - 1 {
$idx++;
my $current := nqp::substr($number, $idx, 1);
my $current := nqp::uc(nqp::substr($number, $idx, 1));
next if $current eq '_';
if $current eq '.' {
$seen_dot := 1;
Expand Down
2 changes: 1 addition & 1 deletion t/spectest.data
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ S02-literals/pair-boolean.t
S02-literals/pairs.t
S02-literals/quoting.t
S02-literals/quoting-unicode.t # icu
# S02-literals/radix.t # err: NYI form of number litereal encountered
S02-literals/radix.t
S02-literals/string-interpolation.t
S02-literals/sub-calls.t
S02-literals/subscript.t
Expand Down

0 comments on commit c61a8d5

Please sign in to comment.