1 USING: help.markup help.syntax words parser ;
4 ARTICLE: "tools.annotations" "Word annotations"
5 "The word annotation feature modifies word definitions to add debugging code. You can restore the old definition by calling " { $link reset } " on the word in question."
7 { $subsection breakpoint }
8 { $subsection breakpoint-if }
9 "All of the above words are implemented using a single combinator which applies a quotation to a word definition to yield a new definition:"
10 { $subsection annotate } ;
12 ABOUT: "tools.annotations"
15 { $values { "word" "a word" } { "quot" "a quotation with stack effect " { $snippet "( word def -- def )" } } }
16 { $description "Changes a word definition to the result of applying a quotation to the old definition." }
17 { $notes "This word is used to implement " { $link watch } "." } ;
20 { $values { "word" word } }
21 { $description "Annotates a word definition to print the data stack on entry and exit." } ;
24 { $values { "word" word } }
25 { $description "Annotates a word definition to enter the single stepper when executed." } ;
28 { $values { "quot" "a quotation with stack effect" { $snippet "( -- ? )" } } { "word" word } }
29 { $description "Annotates a word definition to enter the single stepper if the quotation yields true." } ;