]> gitweb.factorcode.org Git - factor.git/commitdiff
math.parser: remove unnecessary with-no-radix, thanks @jonenst!
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 16 Jul 2015 14:32:44 +0000 (07:32 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 16 Jul 2015 14:35:51 +0000 (07:35 -0700)
core/math/parser/parser.factor

index 6c628433e51f0c10b1ca9361facf09e9a54f97c6..a7b277b1a8c839d115d6e9a2165cac0a120c51a3 100644 (file)
@@ -279,28 +279,15 @@ DEFER: @neg-digit
         [ @pos-first-digit ]
     } case ; inline
 
-: with-no-radix ( i number-parse n quot -- n/f )
-    [
-        swap {
-            { CHAR: b [ pick radix>> 16 = [ CHAR: b swap call ] [ @abort ] if ] }
-            { CHAR: o [ @abort ] }
-            { CHAR: x [ @abort ] }
-            { f [ 4drop 0 ] }
-            [ swap call ]
-        } case
-    ] curry next-digit ; inline
-
 : @neg-first-digit-no-radix ( i number-parse n char -- n/f )
     {
         { CHAR: . [ ->required-mantissa ] }
-        { 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-or-punc ] with-no-radix ] }
         [ @pos-digit ]
     } case ; inline