More verbose see.
This commit is contained in:
@ -233,6 +233,7 @@ static void forth_init(int argc, char *argv[], void *heap,
|
||||
for (int i = 0; i < VOCABULARY_DEPTH; ++i) { *g_sys.heap++ = 0; }
|
||||
|
||||
forth_run(0);
|
||||
g_sys.latestxt = 0; // So ; doesn't get wrong size.
|
||||
g_sys.DOLIT_XT = FIND("DOLIT");
|
||||
g_sys.DOFLIT_XT = FIND("DOFLIT");
|
||||
g_sys.DOEXIT_XT = FIND("EXIT");
|
||||
|
||||
@ -55,9 +55,14 @@ internals definitions
|
||||
: see-loop dup >body swap >params 1- cells over +
|
||||
begin 2dup < while swap see-one swap repeat 2drop ;
|
||||
: see-xt ( xt -- )
|
||||
dup @ ['] see-loop @ <>
|
||||
if ." Unsupported word type: " see. cr exit then
|
||||
['] : see. dup see. space see-loop ['] ; see. cr ;
|
||||
dup @ ['] see-loop @ = if
|
||||
['] : see. dup see. space see-loop ['] ; see. cr exit
|
||||
then
|
||||
dup @ ['] input-buffer @ = if ." CREATE/VARIABLE: " see. cr exit then
|
||||
dup @ ['] SMUDGE @ = if ." DOES>/CONSTANT: " see. cr exit then
|
||||
dup >params 0= if ." Built-in: " see. cr exit then
|
||||
." Unsupported: " see. cr ;
|
||||
|
||||
: nonvoc? ( xt -- f )
|
||||
dup 0= if exit then dup >name nip swap >flags NONAMED and or ;
|
||||
: see-vocabulary ( voc )
|
||||
|
||||
Reference in New Issue
Block a user