]> gitweb.factorcode.org Git - factor.git/blob - basis/prettyprint/config/config-docs.factor
prettyprint.config: adding some docs for has-limits?
[factor.git] / basis / prettyprint / config / config-docs.factor
1 USING: help.markup help.syntax io kernel
2 prettyprint.sections words quotations ;
3 IN: prettyprint.config
4
5 ABOUT: "prettyprint-variables"
6
7 HELP: tab-size
8 { $var-description "Prettyprinter tab size. Indent nesting is always a multiple of the tab size." } ;
9
10 HELP: margin
11 { $var-description "The maximum line length, in characters. Lines longer than the margin are wrapped." } ;
12
13 HELP: nesting-limit
14 { $var-description "The maximum nesting level. Structures that nest further than this will simply print as a pound sign (#). The default is " { $link f } ", denoting unlimited nesting depth." } ;
15
16 HELP: length-limit
17 { $var-description "The maximum printed sequence length. Sequences longer than this are truncated, and \"...\" is output in place of remaining elements. The default is " { $link f } ", denoting unlimited sequence length." } ;
18
19 HELP: line-limit
20 { $var-description "The maximum number of lines output by the prettyprinter before output is truncated with \"...\". The default is " { $link f } ", denoting unlimited line count." } ;
21
22 HELP: number-base
23 { $var-description "The number base in which the prettyprinter will output numeric literals. A value of " { $snippet "2" } " will print integers and ratios in binary with " { $snippet "0b" } ". A value of " { $snippet "8" } " will print them in octal with " { $snippet "0o" } ". A value of " { $snippet "16" } " will print all integers, ratios, and floating-point values in hexadecimal with " { $snippet "0x" } ". Other values of " { $snippet "number-base" } " will print numbers in decimal, which is the default." } ;
24
25 HELP: string-limit?
26 { $var-description "Toggles whether printed strings are truncated to the margin." } ;
27
28 HELP: boa-tuples?
29 { $var-description "Toggles whether tuples and structs print in BOA-form or assoc-form." }
30 { $notes "See " { $link POSTPONE: T{ } " for a description of both literal tuple forms." } ;
31
32 HELP: c-object-pointers?
33 { $var-description "Toggles whether C objects such as structs and direct arrays only print their underlying address. If this flag isn't set, C objects will attempt to print their contents. If a C object points to invalid memory, it will display only its address regardless." } ;
34
35 HELP: has-limits?
36 { $var-description "Used to indicate that prettyprint limits have been set." } ;
37
38 HELP: (with-short-limits)
39 { $values { "quot" quotation } }
40 { $description "Calls a quotation in a new dynamic scope with prettyprinter limits set to produce a single line of output." } ;
41
42 HELP: with-short-limits
43 { $values { "quot" quotation } }
44 { $description "Calls a quotation in a new dynamic scope with prettyprinter limits set to produce a single line of output, if " { $link has-limits? } " is not set." } ;
45
46 { with-short-limits (with-short-limits) } related-words
47
48 HELP: (without-limits)
49 { $values { "quot" quotation } }
50 { $description "Calls a quotation in a new dynamic scope with prettyprinter limits set to produce unlimited output." } ;
51
52 HELP: without-limits
53 { $values { "quot" quotation } }
54 { $description "Calls a quotation in a new dynamic scope with prettyprinter limits set to produce unlimited output, if " { $link has-limits? } " is not set." } ;
55
56 { without-limits (without-limits) } related-words