Permalink
Browse files

Add actions needed to handle the basic :N<number_base_N> radix form o…

…f numeric literals.
  • Loading branch information...
1 parent cccad74 commit a2e7b9bc4027091dea8efbdb4cd58b3885003d2e @colomon colomon committed Nov 3, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/NieczaActions.pm6
View
@@ -134,6 +134,13 @@ method dec_number ($/) {
else { make [10, ~$/] }
}
+method alnumint ($/) { }
+method radint ($/) { }
+method rad_number ($/) {
+ # MUST: need to handle base and exp fields as well
+ make [+$<radix>, ~$<coeff>]
+}
+
method number($/) {
my $child = $<integer> // $<dec_number> // $<rad_number>;
make (defined($child) ?? $child.ast !!

0 comments on commit a2e7b9b

Please sign in to comment.