some fixes

cvs
Slava Pestov 2005-09-26 02:20:29 +00:00
parent 7d5222ca73
commit 7e1b29e440
2 changed files with 19 additions and 6 deletions

View File

@ -100,8 +100,8 @@ M: string error. ( error -- ) print ;
M: object error. ( error -- ) . ;
: :s ( -- ) "error-datastack" stack. ;
: :r ( -- ) "error-callstack" stack. ;
: :s ( -- ) "error-datastack" get stack. ;
: :r ( -- ) "error-callstack" get stack. ;
: :get ( var -- value ) "error-namestack" get (get) ;

View File

@ -39,15 +39,28 @@ DEFER: describe
: word. ( word -- )
dup word-name swap dup [ see ] curry write-outliner ;
: vocab. ( vocab -- )
f over [ words [ word. ] each ] curry write-outliner ;
: word-outline ( words quot -- )
swap [
[ word-name ] keep rot dupd curry write-outliner
] each-with ;
: browser ( -- )
: words. ( vocab -- )
words [ see ] word-outline ;
: vocabs. ( -- )
#! Outlining word browser.
vocabs [ vocab. ] each ;
vocabs [ f over [ words. ] curry write-outliner ] each ;
: stack. ( seq -- seq )
reverse-slice >array describe ;
: usage. ( word -- )
#! Outlining usages browser.
usage [ usage. ] word-outline ;
: uses. ( word -- )
#! Outlining call hierarchy browser.
uses [ uses. ] word-outline ;
: .s datastack stack. ;
: .r callstack stack. ;