From 0e90798e98121abab274434ec60f0b873f510021 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 24 Aug 2018 09:52:17 +0200 Subject: src: simplify map statement Instead of using the map expression, store dynamic key and data separately since they need special handling than constant maps. Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index bc6f7277..199ef13d 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2872,7 +2872,8 @@ map_stmt : set_stmt_op symbol_expr '{' set_elem_expr_stmt COLON set_elem_expr_s { $$ = map_stmt_alloc(&@$); $$->map.op = $1; - $$->map.map = map_expr_alloc(&@$, $4, $6); + $$->map.key = $4; + $$->map.data = $6; $$->map.set = $2; } ; -- cgit v1.2.3