Selector and option heads had pointers to their
ends, but this turned out to be unnecessary
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
{
enum graph_node_type type; // data type this node matches or holds
vector children; // this node's children
- struct graph_node *end; // pointer to end for SELECTOR_GN & OPTION_GN
char *text; // original format text
char *doc; // docstring for this node
{
struct graph_node *new = new_node(node->type);
new->children = NULL;
- new->end = NULL;
new->text = node->text ? XSTRDUP(MTYPE_CMD_TOKENS, node->text) : NULL;
new->value = node->value;
new->min = node->min;
assert(!selnode_start && !selnode_end); // both should be null
selnode_start = new_node (SELECTOR_GN); // diverging node
selnode_end = new_node (NUL_GN); // converging node
- selnode_start->end = selnode_end; // duh
}
// add element head as a child of the selector