then
;
+: arg-type-error
+ bold fg red ." Incorrect argument type." reset-term cr
+ abort
+;
+
+: ensure-arg-type ( arg type -- arg )
+ istype? false = if
+ arg-type-error
+ then
+;
+
include scheme-primitives.4th
\ }}}
: minus? ( -- bool )
nextchar [char] - = ;
+: plus? ( -- bool )
+ nextchar [char] + = ;
+
: fixnum? ( -- bool )
- minus? if
+ minus? plus? or if
inc-parse-idx
delim? if
nextchar [char] " = ;
: readnum ( -- num-atom )
- minus? dup if
+ plus? minus? or if
+ minus?
inc-parse-idx
+ else
+ false
then
0