Listener now displays stacks and watched variables

db4
Slava Pestov 2008-11-20 21:54:28 -06:00
parent 3b037c8947
commit 786ca76d02
2 changed files with 8 additions and 8 deletions

View File

@ -5,11 +5,11 @@ ARTICLE: "listener-watch" "Watching variables in the listener"
"The listener prints the concepts of the data and retain stacks after every expression. It can also print values of dynamic variables which are added to a watch list:" "The listener prints the concepts of the data and retain stacks after every expression. It can also print values of dynamic variables which are added to a watch list:"
{ $subsection visible-vars } { $subsection visible-vars }
"To add or remove a single variable:" "To add or remove a single variable:"
{ $subsection watch-var } { $subsection show-var }
{ $subsection unwatch-var } { $subsection hide-var }
"To add and remove multiple variables:" "To add and remove multiple variables:"
{ $subsection watch-vars } { $subsection show-vars }
{ $subsection unwatch-vars } ; { $subsection hide-vars } ;
ARTICLE: "listener" "The listener" ARTICLE: "listener" "The listener"
"The listener evaluates Factor expressions read from a stream. The listener is the primary interface to the Factor runtime. Typically, you write Factor code in a text editor, then load it using the listener and test it." "The listener evaluates Factor expressions read from a stream. The listener is the primary interface to the Factor runtime. Typically, you write Factor code in a text editor, then load it using the listener and test it."

View File

@ -42,13 +42,13 @@ PRIVATE>
SYMBOL: visible-vars SYMBOL: visible-vars
: watch-var ( sym -- ) visible-vars [ swap suffix ] change ; : show-var ( sym -- ) visible-vars [ swap suffix ] change ;
: watch-vars ( seq -- ) visible-vars [ swap union ] change ; : show-vars ( seq -- ) visible-vars [ swap union ] change ;
: unwatch-var ( sym -- ) visible-vars [ remove ] change ; : hide-var ( sym -- ) visible-vars [ remove ] change ;
: unwatch-vars ( seq -- ) visible-vars [ swap diff ] change ; : hide-vars ( seq -- ) visible-vars [ swap diff ] change ;
SYMBOL: error-hook SYMBOL: error-hook