]> gitweb.factorcode.org Git - factor.git/blob - extra/yaml/config/config-docs.factor
factor: remove """ string syntax for now. there are HEREDOC:, STRING:, escaping ...
[factor.git] / extra / yaml / config / config-docs.factor
1 ! Copyright (C) 2014 Jon Harper.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax yaml.ffi yaml.conversion ;
4 IN: yaml.config
5
6 HELP: +libyaml-default+
7 { $var-description "Setting a variable in the following list to " { $link +libyaml-default+ } " leaves libyaml's default options:" }
8 { $subsections
9   emitter-canonical
10   emitter-indent
11   emitter-line-break
12   emitter-unicode
13   emitter-width
14 } ;
15
16
17 HELP: emitter-canonical
18 { $var-description "If set, " { $link yaml_emitter_set_canonical } " is called with the value of this variable at the beginning of each document." } ;
19
20 HELP: emitter-indent
21 { $var-description "If set, " { $link yaml_emitter_set_indent } " is called with the value of this variable at the beginning of each document." } ;
22
23 HELP: emitter-line-break
24 { $var-description "If set, " { $link yaml_emitter_set_break } " is called with the value of this variable at the beginning of each document." } ;
25
26 HELP: emitter-unicode
27 { $var-description "If set, " { $link yaml_emitter_set_unicode } " is called with the value of this variable at the beginning of each document." } ;
28
29 HELP: emitter-width
30 { $var-description "If set, " { $link yaml_emitter_set_width } " is called with the value of this variable at the beginning of each document." } ;
31
32 ARTICLE: "yaml-config" "YAML control variables"
33 { $subsections
34   "yaml-input"
35   "yaml-output"
36 }
37 ;
38
39 ARTICLE: "yaml-input" "YAML deserialization control"
40 "The following variables control the YAML deserialization process:"
41 { $heading "Special Keys" }
42 { $subsections
43   value
44   merge
45 } ;
46 ARTICLE: "yaml-output" "YAML serialization control"
47 "The following variables control the YAML serialization process:"
48 { $heading "LibYAML's emitter:" }
49 { $subsections
50   emitter-canonical
51   emitter-indent
52   emitter-line-break
53   emitter-unicode
54   emitter-width
55 }
56 "Using libyaml's default values: " { $link +libyaml-default+ }
57 { $heading "Tags" }
58 { $subsections
59   implicit-tags
60 }
61 { $heading "Document markers" }
62 { $subsections
63   implicit-start
64   implicit-end
65 }
66 ;
67
68 HELP: implicit-tags
69 { $var-description "When this is set, tags are omitted during serialization when it safe to do so. For example, 42 can be safely serialized as \"42\", but \"42\" must be serialized as \"'42'\" or \"\"42\"\" or \"!!str 42\". This uses the "
70 { $snippet "implicit" } " parameter of "
71 { $link yaml_scalar_event_initialize } ", " { $link yaml_sequence_start_event_initialize } " and " { $link yaml_mapping_start_event_initialize } "."
72  } ;
73
74 HELP: implicit-start
75 { $var-description "The \""
76 { $snippet "implicit" } "\" parameter of " { $link yaml_document_start_event_initialize } ". Changing this variable is always safe and produces valid YAML documents because LibYAML ignores it when it would be invalid (for example, when there are multiple documents in a stream)." }
77 ;
78
79 HELP: implicit-end
80 { $var-description "The \""
81 { $snippet "implicit" } "\" parameter of " { $link yaml_document_end_event_initialize } ". Changing this variable is always safe and produces valid YAML documents because LibYAML ignores it when it would be invalid (for example, when there are multiple documents in a stream)." }
82 ;
83
84 { implicit-start implicit-end } related-words
85
86 HELP: merge
87 { $var-description "If false, deserialized yaml documents will contain instances of " { $link yaml-merge } " for !!merge keys and the value associated with this key will not be merged into the enclosing mapping. You can then call ?apply-merge-key on such a mapping to perform the merge."  } ;
88
89 HELP: value
90 { $var-description "If false, deserialized yaml documents will contain instances of " { $link yaml-value } " for !!value keys and the value associated with this key will replace the enclosing mapping. You can then call scalar-value on such a mapping to get the default value."  } ;
91 ABOUT: "yaml-config"
92 { yaml-merge merge } related-words
93 { yaml-value value } related-words