]> gitweb.factorcode.org Git - factor.git/commitdiff
docs for new syntax and pprint config
authorJoe Groff <arcata@gmail.com>
Mon, 31 Aug 2009 02:14:14 +0000 (21:14 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 31 Aug 2009 02:14:14 +0000 (21:14 -0500)
basis/classes/struct/struct-docs.factor
basis/prettyprint/config/config-docs.factor
basis/prettyprint/prettyprint-docs.factor

index 787f03423ec119547f78afbba1c122497d0fa882..031e4492a54ec06448bd8889855a51c89530bce7 100644 (file)
@@ -42,6 +42,11 @@ HELP: S{
 { $values { "class" "a " { $link struct } " class word" } { "slots" "slot values" } }
 { $description "Marks the beginning of a literal struct. The syntax is identical to tuple literal syntax with " { $link POSTPONE: T{ } { $snippet " }" } "; either the assoc syntax (that is, " { $snippet "S{ class { slot value } { slot value } ... }" } ") or the simple syntax (" { $snippet "S{ class f value value ... }" } ") can be used." } ;
 
+HELP: S@
+{ $syntax "S@ class alien" }
+{ $values { "class" "a " { $link struct } " class word" } { "alien" "a literal alien" } }
+{ $description "Marks the beginning of a literal struct at a specific C address. The prettyprinter uses this syntax when the memory backing a struct object is invalid. This syntax should not generally be used in source code." } ;
+
 HELP: UNION-STRUCT:
 { $syntax "UNION-STRUCT: class { slot type } { slot type } ... ;" }
 { $values { "class" "a new " { $link struct } " class to define" } { "slots" "a list of slot specifiers" } }
index dda565d5c9565b00ef5bc42f67c00255a84d6681..1dcb1b5617f788d71addd5ea6749da9c3df2262b 100644 (file)
@@ -23,5 +23,8 @@ HELP: string-limit?
 { $var-description "Toggles whether printed strings are truncated to the margin." } ;
 
 HELP: boa-tuples?
-{ $var-description "Toggles whether tuples print in BOA-form or assoc-form." }
+{ $var-description "Toggles whether tuples and structs print in BOA-form or assoc-form." }
 { $notes "See " { $link POSTPONE: T{ } " for a description of both literal tuple forms." } ;
+
+HELP: c-object-pointers?
+{ $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." } ;
index fbbece46028ae2bb7f9b991bd9a15fd03f035d66..7c114f2e228cc1630f388589d5ff6cd583fec14e 100644 (file)
@@ -30,6 +30,7 @@ ARTICLE: "prettyprint-variables" "Prettyprint control variables"
 { $subsection line-limit }
 { $subsection string-limit? }
 { $subsection boa-tuples? }
+{ $subsection c-object-pointers? }
 "Note that the " { $link short. } " and " { $link pprint-short } " variables override some of these variables."
 {
     $warning "Treat the global variables as essentially being constants. Only ever rebind them in a nested scope."