]> gitweb.factorcode.org Git - factor.git/commitdiff
more docs for tools.annotations
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 6 Sep 2008 00:01:39 +0000 (19:01 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 6 Sep 2008 00:01:39 +0000 (19:01 -0500)
basis/tools/annotations/annotations-docs.factor

index affb95c761c4df9e95e83b180a9e2d02bf6fdf78..f0a3235e62ec6d2dd3ea39892c4e8ff0381e3914 100755 (executable)
@@ -1,4 +1,5 @@
-USING: help.markup help.syntax words parser ;
+USING: help.markup help.syntax words parser quotations strings
+system sequences ;
 IN: tools.annotations
 
 ARTICLE: "tools.annotations" "Word annotations"
@@ -20,6 +21,8 @@ HELP: watch
 { $values { "word" word } }
 { $description "Annotates a word definition to print the data stack on entry and exit." } ;
 
+{ watch watch-vars reset } related-words
+
 HELP: breakpoint
 { $values { "word" word } }
 { $description "Annotates a word definition to enter the single stepper when executed." } ;
@@ -27,3 +30,36 @@ HELP: breakpoint
 HELP: breakpoint-if
 { $values { "quot" "a quotation with stack effect" { $snippet "( -- ? )" } } { "word" word } }
 { $description "Annotates a word definition to enter the single stepper if the quotation yields true." } ;
+
+HELP: annotate-methods
+{ $values
+     { "word" word } { "quot" quotation } }
+{ $description "Annotates the word -- for generic words, all its methods -- with the quotation." } ;
+
+HELP: entering
+{ $values
+     { "str" string } }
+{ $description "Prints a message and the inputs to the word before the word has been called." } ;
+
+HELP: leaving
+{ $values
+     { "str" string } }
+{ $description "Prints a message and the outputs from a word after a word has been called." } ;
+
+HELP: reset
+{ $values
+     { "word" word } }
+{ $description "Resets any annotations on a word." }
+{ $notes "This word will remove a " { $link watch } "." } ;
+
+HELP: watch-vars
+{ $values
+     { "word" word } { "vars" "a sequence of symbols" } }
+{ $description "Annotates a word definition to print the " { $snippet "vars" } " upon entering the word. This word is useful for debugging." } ;
+
+HELP: word-inputs
+{ $values
+     { "word" word }
+     { "seq" sequence } }
+{ $description "Makes a sequence of the inputs to a word by counting the number of inputs in the stack effect and saving that many items from the datastack." } ;
+