Permalink
Browse files

fix radcalc, generate errors with line numbers, run tests

  • Loading branch information...
1 parent c0ac660 commit c61a8d53ce6a9e350cc72afa8b31524c03d91ba8 @moritz moritz committed Aug 9, 2011
Showing with 8 additions and 3 deletions.
  1. +7 −2 src/Perl6/Actions.pm
  2. +1 −1 t/spectest.data
View
@@ -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);
}
}
@@ -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;
View
@@ -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

0 comments on commit c61a8d5

Please sign in to comment.