-
-
Save MasterDuke17/01ce055d4860e58681c63c637f271c7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/NQP/Actions.nqp b/src/NQP/Actions.nqp | |
index 5fe101ea7..79116641b 100644 | |
--- a/src/NQP/Actions.nqp | |
+++ b/src/NQP/Actions.nqp | |
@@ -1574,11 +1574,22 @@ class NQP::Actions is HLL::Actions { | |
} | |
method number($/) { | |
- my $value := $<dec_number> ?? $<dec_number>.ast !! $<integer>.ast; | |
- if ~$<sign> eq '-' { $value := -$value; } | |
+ my $num; | |
+ my int $int; | |
+ if $<dec_number> { | |
+ $num := $<dec_number>.ast; | |
+note("v: " ~ $<dec_number>.ast); | |
+note("num: " ~ $num); | |
+ } | |
+ else { | |
+ $int := $<integer>.ast; | |
+note("v: " ~ $<integer>.ast); | |
+note("int: " ~ $int); | |
+ } | |
+ if ~$<sign> eq '-' { $num := -$num; $int := -$int } | |
make $<dec_number> ?? | |
- QAST::NVal.new( :value($value) ) !! | |
- QAST::IVal.new( :value($value) ); | |
+ QAST::NVal.new( :value($num) ) !! | |
+ QAST::IVal.new( :value($int) ); | |
$/.prune; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment