actually add child node spec to spec itself

Fixes: https://github.com/kdl-org/kdl/issues/59
This commit is contained in:
Kat Marchán 2021-08-31 23:08:12 -07:00
parent 0a3e498e16
commit 7c54aae64f
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 22 additions and 2 deletions

24
SPEC.md
View File

@ -130,7 +130,7 @@ immediately by a `=`, and then a [Value](#value).
Properties should be interpreted left-to-right, with rightmost properties with Properties should be interpreted left-to-right, with rightmost properties with
identical names overriding earlier properties. That is: identical names overriding earlier properties. That is:
``` ```kdl
node a=1 a=2 node a=1 a=2
``` ```
@ -155,12 +155,32 @@ each other (not counting Properties).
Arguments _MAY_ be prefixed with `/-` to "comment out" the entire token and Arguments _MAY_ be prefixed with `/-` to "comment out" the entire token and
make it act as plain whitespace, even if it spreads across multiple lines. make it act as plain whitespace, even if it spreads across multiple lines.
### Example #### Example
```kdl ```kdl
my-node 1 2 3 "a" "b" "c" my-node 1 2 3 "a" "b" "c"
``` ```
### Children Block
A children block is a block of [Nodes](#node), surrounded by `{` and `}`. They
are an optional terminator for nodes, and create a hierarchy of KDL nodes.
Regular node termination rules apply, which means multiple nodes can be
included in a single-line children block, as long as they're all terminated by
`;`.
#### Example
```kdl
parent {
child1
child2
}
parent { child1; child2; }
```
### Value ### Value
A value is either: a [String](#string), a [Raw String](#raw-string), a A value is either: a [String](#string), a [Raw String](#raw-string), a