Add AST node source location information in a couple more parser rules.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Tue, 17 Mar 2020 06:21:10 +0000 (06:21 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Tue, 17 Mar 2020 06:22:12 +0000 (06:22 +0000)
frontends/verilog/verilog_parser.y

index 1132e97ae6caa67ce17c32192724ec86f48e702a..d04b3250968414484534d08aff7e1100a0798865 100644 (file)
@@ -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;
        };