]> gitweb.factorcode.org Git - factor.git/commitdiff
math.parser: okay time for sleep, maybe this works, sorry git history.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jul 2015 05:48:08 +0000 (22:48 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jul 2015 05:48:08 +0000 (22:48 -0700)
core/math/parser/parser-tests.factor
core/math/parser/parser.factor

index f27d9266f318b11602d47475dd53c9dc43765788..215137954bcfd2ef5cb9bfed51bbdcfbde0839b6 100644 (file)
@@ -363,7 +363,7 @@ unit-test
 
 ! #1229, float parsing bug, and a regression
 { -0.5 } [ "-.5" dec> ] unit-test
-{ "0" } [ "0" hex> ] 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 c60d60aa785fdc8dd60cd5b672bc0d51be8e2d42..6c628433e51f0c10b1ca9361facf09e9a54f97c6 100644 (file)
@@ -288,19 +288,19 @@ DEFER: @neg-digit
             { f [ 4drop 0 ] }
             [ swap call ]
         } case
-    ] curry require-next-digit ; inline
+    ] curry next-digit ; inline
 
 : @neg-first-digit-no-radix ( i number-parse n char -- n/f )
     {
         { CHAR: . [ ->required-mantissa ] }
-        { CHAR: 0 [ [ @neg-digit ] with-no-radix ] }
+        { CHAR: 0 [ [ @neg-digit-or-punc ] with-no-radix ] }
         [ @neg-digit ]
     } case ; inline
 
 : @pos-first-digit-no-radix ( i number-parse n char -- n/f )
     {
         { CHAR: . [ ->required-mantissa ] }
-        { CHAR: 0 [ [ @pos-digit ] with-no-radix ] }
+        { CHAR: 0 [ [ @pos-digit-or-punc ] with-no-radix ] }
         [ @pos-digit ]
     } case ; inline