From 7c54aae64f4c1c5d05f911eefa9b32aa7b84a7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 31 Aug 2021 23:08:12 -0700 Subject: [PATCH] actually add child node spec to spec itself Fixes: https://github.com/kdl-org/kdl/issues/59 --- SPEC.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/SPEC.md b/SPEC.md index fccb432..cfb65cf 100644 --- a/SPEC.md +++ b/SPEC.md @@ -130,7 +130,7 @@ immediately by a `=`, and then a [Value](#value). Properties should be interpreted left-to-right, with rightmost properties with identical names overriding earlier properties. That is: -``` +```kdl 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 make it act as plain whitespace, even if it spreads across multiple lines. -### Example +#### Example ```kdl 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 A value is either: a [String](#string), a [Raw String](#raw-string), a