From c09c46ae3c2702b3553e558f723e6de4fea3e05d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 22 Mar 2017 06:56:17 +0100 Subject: 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 --- lib/command.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/command.c') 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); -- cgit v1.2.3