]> gitweb.factorcode.org Git - factor.git/commitdiff
math.parser: fix a regression.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jul 2015 05:05:25 +0000 (22:05 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jul 2015 05:05:25 +0000 (22:05 -0700)
core/math/parser/parser-tests.factor
core/math/parser/parser.factor

index df9abe79246f43eb99ad8554d84bb131040c6bab..f27d9266f318b11602d47475dd53c9dc43765788 100644 (file)
@@ -361,8 +361,9 @@ unit-test
 { f } [ "0o0" bin> ] unit-test
 { f } [ "0x0" bin> ] unit-test
 
-! #1229, float parsing bug
+! #1229, float parsing bug, and a regression
 { -0.5 } [ "-.5" dec> ] unit-test
+{ "0" } [ "0" hex> ] unit-test
 
 { t } [ most-positive-fixnum number>string string>number fixnum? ] unit-test
 { t } [ most-negative-fixnum number>string string>number fixnum? ] unit-test
index 3f1edd5a3a07c2410b151acafc205ec9acc1d834..c60d60aa785fdc8dd60cd5b672bc0d51be8e2d42 100644 (file)
@@ -285,6 +285,7 @@ DEFER: @neg-digit
             { CHAR: b [ pick radix>> 16 = [ CHAR: b swap call ] [ @abort ] if ] }
             { CHAR: o [ @abort ] }
             { CHAR: x [ @abort ] }
+            { f [ 4drop 0 ] }
             [ swap call ]
         } case
     ] curry require-next-digit ; inline