There seems to be no way to create a node with an empty child set. Not quite sure if that is an issue. It probably is in some cases. Anyway it seems strange this cannot be done. For example:
node "empty" {}
node "empty" { value "''" }
node "empty" { value "'abc'" }
node "parent" { copy "0" }
node "parent" { if "0" { node "a" { } } }
Output:
empty ""
empty ""
empty "abc"
parent ""
parent ""
The last 2 examples could/should create a vacant parent node, e.g. parent { }. The logic being that if the compound statement contains another node or copy statement, a parent node is implied, but will be vacant if no actual child nodes are created.
It is an odd way to create a parent that is deliberately vacant, but how often will you need to do this anyway?
There seems to be no way to create a node with an empty child set. Not quite sure if that is an issue. It probably is in some cases. Anyway it seems strange this cannot be done. For example:
Output:
The last 2 examples could/should create a vacant parent node, e.g.
parent { }
. The logic being that if the compound statement contains another node or copy statement, a parent node is implied, but will be vacant if no actual child nodes are created.It is an odd way to create a parent that is deliberately vacant, but how often will you need to do this anyway?