X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=blobdiff_plain;f=src%2Fscheme.4th;h=c448b0242168eaebaa49dcdd3138282496a3b59f;hp=c1d42e8a9836caea4f8925e2d21e173434f71098;hb=06e8259c96d3282d8904006aa9137ed563d8fe86;hpb=dee0ca5343f31d2fd0480f515a07665c1a6c8951 diff --git a/src/scheme.4th b/src/scheme.4th index c1d42e8..c448b02 100644 --- a/src/scheme.4th +++ b/src/scheme.4th @@ -853,7 +853,7 @@ parse-idx-stack parse-idx-sp ! : string? ( -- bool ) nextchar [char] " = ; -: readfixnum ( -- num-atom ) +: readfixnum ( -- fixnum ) plus? minus? or if minus? inc-parse-idx @@ -873,6 +873,26 @@ parse-idx-stack parse-idx-sp ! fixnum-type ; +: readflonum ( -- flonum ) + \ DRAFT!!! + readfixnum drop i->f + + [char] . netchar = if + 10 i->f + begin digit? while + nextchar [char] 0 - i->f over f/ f+ + inc-parse-idx + repeat + then + + [char] e nextchar = [char] E nextchar = or if + readfixnum drop i->f + f^ + then + + flonum-type +; + : readbool ( -- bool-obj ) inc-parse-idx