This is the third serie related to rewriting cmd's command engine.
Currently, cmd stores block of commands as a linked list of CMD_LIST. Even for nested commands (like 'if' command inside a 'for' command), it's parsed as a single list of commands, using a 'depth' attribute and marker for end of block to describe the structure.
This leads to several issues: - parsing for nested commands is not 100% robust, - chaining of commands (and its precedence) is not handled, - no separation between parsing and execution (esp. for 'IF' and 'FOR' commands, which behave slightly differently than regular commands when dealing with variables with delayed expansion), - data model doesn't 100% fit native behavior (eg redirections can apply to a block of commands, whereas redirections are attached to individual commands) - ...
The final goal is to replace this with: - a tree of commands: + binary nodes for command chaining, + 'IF' and 'FOR' commands being parsed and stored as such + leaf being a command
It will require a couple more series to reach that goal, so this series puts in place the basic building bits: - introducing a new structure CMD_NODE to hold that each node of such a tree, - moving the chaining operator into that CMD_NODE (meaning that we move from a linked list to a binary tree degenerated into a list: left is command, right is next node).