From: Alberto Gonzalez Date: Tue, 17 Mar 2020 06:21:10 +0000 (+0000) Subject: Add AST node source location information in a couple more parser rules. X-Git-Tag: working-ls180~745^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6dd20249658f711ff327cc71375f0f8d93841403;p=yosys.git Add AST node source location information in a couple more parser rules. --- 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; };