2009-03-11 08:18:24 -04:00
IN: see
USING: help.markup help.syntax strings prettyprint.private
definitions generic words classes ;
HELP: synopsis
{ $values { "defspec" "a definition specifier" } { "str" string } }
{ $contract "Prettyprints the prologue of a definition." } ;
HELP: synopsis*
{ $values { "defspec" "a definition specifier" } }
{ $contract "Adds sections to the current block corresponding to a the prologue of a definition, in source code-like form." }
{ $notes "This word should only be called from inside the " { $link with-pprint } " combinator. Client code should call " { $link synopsis } " instead." } ;
HELP: see
{ $values { "defspec" "a definition specifier" } }
2009-04-06 03:59:59 -04:00
{ $contract "Prettyprints a definition." }
{ $examples
"A word:" { $code "\\ append see" }
"A method:" { $code "USE: arrays" "M\\ array length see" }
"A help article:" { $code "USE: help.topics" "\"help\" >link see" }
} ;
2009-03-11 08:18:24 -04:00
HELP: see-methods
{ $values { "word" "a " { $link generic } " or a " { $link class } } }
{ $contract "Prettyprints the methods defined on a generic word or class." } ;
HELP: definer
2009-05-13 23:15:48 -04:00
{ $values { "defspec" "a definition specifier" } { "start" word } { "end" { $maybe word } } }
2009-03-11 08:18:24 -04:00
{ $contract "Outputs the parsing words which delimit the definition." }
{ $examples
{ $example "USING: definitions prettyprint ;"
"IN: scratchpad"
2009-03-23 18:12:41 -04:00
": foo ( -- ) ; \\ foo definer . ."
2009-03-11 08:18:24 -04:00
";\nPOSTPONE: :"
}
{ $example "USING: definitions prettyprint ;"
"IN: scratchpad"
"SYMBOL: foo \\ foo definer . ."
"f\nPOSTPONE: SYMBOL:"
}
}
{ $notes "This word is used in the implementation of " { $link see } "." } ;
HELP: definition
{ $values { "defspec" "a definition specifier" } { "seq" "a sequence" } }
{ $contract "Outputs the body of a definition." }
{ $examples
{ $example "USING: definitions math prettyprint ;" "\\ sq definition ." "[ dup * ]" }
}
{ $notes "This word is used in the implementation of " { $link see } "." } ;
ARTICLE: "see" "Printing definitions"
"The " { $vocab-link "see" } " vocabulary implements support for printing out " { $link "definitions" } " in the image."
$nl
2009-03-11 09:34:25 -04:00
"Printing a definition:"
2009-03-11 08:18:24 -04:00
{ $subsection see }
"Printing the methods defined on a generic word or class (see " { $link "objects" } "):"
2009-03-23 20:25:10 -04:00
{ $subsection see-methods }
"Definition specifiers implementing the " { $link "definition-protocol" } " should also implement the " { $emphasis "see protocol" } ":"
{ $subsection see* }
{ $subsection synopsis* } ;
2009-03-11 09:34:25 -04:00
ABOUT: "see"