diff options
author | N. Engelhardt <nak@symbioticeda.com> | 2020-03-17 16:55:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 16:55:38 +0100 |
commit | 89a092d641d8c9ccebbcc4550ee8c61cd5ae5f47 (patch) | |
tree | e1ddd76290329e6d53d4f4bf83610e301e96adfe | |
parent | ed4fa19ba2812c286562baf26bbbcb49afad83bc (diff) | |
parent | 6dd20249658f711ff327cc71375f0f8d93841403 (diff) | |
download | yosys-89a092d641d8c9ccebbcc4550ee8c61cd5ae5f47.tar.gz yosys-89a092d641d8c9ccebbcc4550ee8c61cd5ae5f47.tar.bz2 yosys-89a092d641d8c9ccebbcc4550ee8c61cd5ae5f47.zip |
Merge pull request #1776 from boqwxp/precise_locations
Add AST node source location information in a couple more parser rules.
-rw-r--r-- | frontends/verilog/verilog_parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
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; }; |