1 USING: help.markup help.syntax io kernel
2 prettyprint.config prettyprint.sections prettyprint.custom
4 IN: prettyprint.backend
6 ABOUT: "prettyprint-extension"
9 { $values { "word" "a word" } }
10 { $description "Adds a text section for the word. Unlike the " { $link word } " method of " { $link pprint* } ", this does not add a " { $link POSTPONE: POSTPONE: } " prefix to parsing words." }
11 $prettyprinting-note ;
14 { $values { "ch" "a character" } { "str" string } }
15 { $description "Converts a character to an escape code." } ;
18 { $values { "ch" "a character" } }
19 { $description "Adds the character to the sequence being constructed (see " { $link "namespaces-make" } "). If the character can appear in a string literal, it is added directly, otherwise an escape code is added." } ;
22 { $values { "str" string } { "trimmed" "a possibly trimmed string" } }
23 { $description "If " { $link string-limit? } " is on, trims the string such that it does not exceed the margin, appending \"...\" if trimming took place." } ;
26 { $values { "obj" object } { "str" string } { "prefix" string } { "suffix" string } }
27 { $description "Outputs a text section consisting of the prefix, the string, and a final quote (\")." }
28 $prettyprinting-note ;
31 { $values { "?" "a boolean" } }
32 { $description "Tests if the " { $link nesting-limit } " has been reached." }
33 $prettyprinting-note ;
36 { $values { "obj" "an object" } { "quot" { $quotation "( obj -- )" } } }
37 { $description "If the object is already being printed, that is, if the prettyprinter has encountered a cycle in the object graph, or if the maximum nesting depth has been reached, outputs a dummy string. Otherwise applies the quotation to the object." }
38 $prettyprinting-note ;
41 { $values { "seq" "a sequence" } { "trimmed" "a trimmed sequence" } { "n/f" "an integer or " { $link f } } }
42 { $description "If the " { $link length-limit } " is set and the sequence length exceeds this limit, trims the sequence and outputs a the number of elements which were chopped off the end. Otherwise outputs " { $link f } "." }
43 $prettyprinting-note ;
46 { $values { "seq" "a sequence" } }
47 { $description "Prettyprints the elements of a sequence, trimming the sequence to " { $link length-limit } " if necessary." }
48 $prettyprinting-note ;