]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprint: @mrjbq7's funny word for . that doesn't limit the length of things.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 10 Oct 2014 01:50:38 +0000 (18:50 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 10 Oct 2014 01:54:14 +0000 (18:54 -0700)
basis/prettyprint/prettyprint-docs.factor
basis/prettyprint/prettyprint.factor

index 299c72f0a49d27c620fee203158f3431b95da4c3..57ecd8fda4e4f02156210bb5adb94995d35b9861 100644 (file)
@@ -159,9 +159,10 @@ ARTICLE: "prettyprint" "The prettyprinter"
 $nl
 "Prettyprinter words are found in the " { $vocab-link "prettyprint" } " vocabulary."
 $nl
-"The key words to print an object to " { $link output-stream } "; the first two emit a trailing newline, the second two do not:"
+"The key words to print an object to " { $link output-stream } "; the first three emit a trailing newline, the second three do not:"
 { $subsections
     .
+    ...
     short.
     pprint
     pprint-short
@@ -205,6 +206,15 @@ HELP: .
     "Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size."
 } ;
 
+HELP: ...
+{ $values { "obj" object } }
+{ $description "Prettyprints an object to " { $link output-stream } " with a trailing line break. Output is unlimited in length." }
+{ $warning
+    "Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size."
+} ;
+
+{ . ... } related-words
+
 HELP: unparse
 { $values { "obj" object } { "str" "Factor source string" } }
 { $description "Outputs a prettyprinted string representation of an object. Output is influenced by many variables; see " { $link "prettyprint-variables" } "." }
index 6a73536c2ac33e8477bd7ed4e720340e733f63ac..fe8f4b2b37d420609115b08ee0e830aae70ff09a 100644 (file)
@@ -21,6 +21,8 @@ IN: prettyprint
 
 : . ( obj -- ) pprint nl ;
 
+: ... ( obj -- ) [ . ] without-limits ;
+
 : pprint-use ( obj -- ) [ pprint* ] with-use ;
 
 : unparse ( obj -- str ) [ pprint ] with-string-writer ;