A "node" is an element that looks like this:
{
"type": "literal|argument",
"parser": "", // only applicable if type is argument
"properties": {}, // only applicable if type is argument, defaults to empty object
"executable": true, // default if not specified is false, meaning it isn't a runnable command by itself
"redirect": [] // default if not specified is null, meaning no redirect
}
A redirect
is a path to another node in the tree. ["foo", "bar", "baz"]
means "find the child named foo
of the root, then the child of that named bar
, then the child of that named baz
".
Children are defined using paths.
A literal
type means "I expect the literal name of this node", and has no properties
.
An argument
type means it's dynamically parsed, using parser
(and any optional properties
)