From 6dd20249658f711ff327cc71375f0f8d93841403 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Date: Tue, 17 Mar 2020 06:21:10 +0000 Subject: [PATCH] Add AST node source location information in a couple more parser rules. --- frontends/verilog/verilog_parser.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index 1132e97ae..d04b32509 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -2380,6 +2380,7 @@ rvalue: hierarchical_id range { $$ = new AstNode(AST_IDENTIFIER, $2); $$->str = *$1; + SET_AST_NODE_LOC($$, @1, @1); delete $1; if ($2 == nullptr && ($$->str == "\\$initstate" || $$->str == "\\$anyconst" || $$->str == "\\$anyseq" || @@ -2389,6 +2390,7 @@ rvalue: hierarchical_id non_opt_multirange { $$ = new AstNode(AST_IDENTIFIER, $2); $$->str = *$1; + SET_AST_NODE_LOC($$, @1, @1); delete $1; }; -- 2.30.2