From e280bafabeffc32eee147ce8d15b02303c966228 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 16 Jul 2015 07:32:44 -0700 Subject: [PATCH] math.parser: remove unnecessary with-no-radix, thanks @jonenst! --- core/math/parser/parser.factor | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index 6c628433e5..a7b277b1a8 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -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