diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-03-22 06:56:17 +0100 |
|---|---|---|
| committer | Quentin Young <qlyoung@users.noreply.github.com> | 2017-05-15 10:27:43 -0400 |
| commit | c09c46ae3c2702b3553e558f723e6de4fea3e05d (patch) | |
| tree | 0f880205691729b8157a38c5df638df3eebe714e /lib/command.c | |
| parent | 5894e76da7974eb00f4c8277a67630f5e50cec53 (diff) | |
lib: parser: add pre-merge varname propagation step
Fills token->varname based on context. WORD tokens use the WORD - if it
isn't actually "WORD". Other than that, a preceding constant token is
used as name.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index 7a53357e7a..0e19a3dfee 100644 --- a/lib/command.c +++ b/lib/command.c @@ -341,6 +341,7 @@ install_element (enum node_type ntype, struct cmd_element *cmd) graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); cmd_graph_parse (graph, cmd); + cmd_graph_names (graph); cmd_graph_merge (cnode->cmdgraph, graph, +1); graph_delete_graph (graph); @@ -387,6 +388,7 @@ uninstall_element (enum node_type ntype, struct cmd_element *cmd) graph_new_node (graph, token, (void (*)(void *)) &cmd_token_del); cmd_graph_parse (graph, cmd); + cmd_graph_names (graph); cmd_graph_merge (cnode->cmdgraph, graph, -1); graph_delete_graph (graph); |
