|
28 | 28 | #define mts(x, y) stack_expr(x).move_to_sub((irept &)stack_expr(y))
|
29 | 29 | #define swapop(x, y) stack_expr(x).operands().swap(stack_expr(y).operands())
|
30 | 30 | #define addswap(x, y, z) stack_expr(x).add(y).swap(stack_expr(z))
|
31 |
| -#define push_scope(x, y) PARSER.push_scope(x, y) |
32 |
| -#define pop_scope() PARSER.pop_scope(); |
| 31 | +#define push_scope(x, y) PARSER.scopes.push_scope(x, y) |
| 32 | +#define pop_scope() PARSER.scopes.pop_scope(); |
33 | 33 |
|
34 | 34 | int yyveriloglex();
|
35 | 35 | extern char *yyverilogtext;
|
@@ -1442,7 +1442,7 @@ net_declaration:
|
1442 | 1442 | type_declaration:
|
1443 | 1443 | TOK_TYPEDEF data_type new_identifier ';'
|
1444 | 1444 | { // add to the scope as a type name
|
1445 |
| - auto &name = PARSER.add_name(stack_expr($3).get(ID_identifier), ""); |
| 1445 | + auto &name = PARSER.scopes.add_name(stack_expr($3).get(ID_identifier), ""); |
1446 | 1446 | name.is_type = true;
|
1447 | 1447 |
|
1448 | 1448 | init($$, ID_decl);
|
@@ -1535,7 +1535,7 @@ data_type:
|
1535 | 1535 |
|
1536 | 1536 | // We attach a dummy id to distinguish two syntactically
|
1537 | 1537 | // identical enum types.
|
1538 |
| - auto id = PARSER.current_scope->prefix + "enum-" + PARSER.get_next_id(); |
| 1538 | + auto id = PARSER.scopes.current_scope->prefix + "enum-" + PARSER.get_next_id(); |
1539 | 1539 | stack_expr($$).set(ID_identifier, id);
|
1540 | 1540 | }
|
1541 | 1541 | | TOK_STRING
|
@@ -1569,7 +1569,7 @@ enum_name_declaration:
|
1569 | 1569 | TOK_NON_TYPE_IDENTIFIER enum_name_value_opt
|
1570 | 1570 | {
|
1571 | 1571 | init($$);
|
1572 |
| - auto &scope = PARSER.add_name(stack_expr($1).id(), ""); |
| 1572 | + auto &scope = PARSER.scopes.add_name(stack_expr($1).id(), ""); |
1573 | 1573 | stack_expr($$).set(ID_base_name, scope.base_name());
|
1574 | 1574 | stack_expr($$).set(ID_identifier, scope.identifier());
|
1575 | 1575 | stack_expr($$).add(ID_value).swap(stack_expr($2));
|
@@ -4426,7 +4426,7 @@ type_identifier: TOK_TYPE_IDENTIFIER
|
4426 | 4426 | init($$, ID_typedef_type);
|
4427 | 4427 | auto base_name = stack_expr($1).id();
|
4428 | 4428 | stack_expr($$).set(ID_base_name, base_name);
|
4429 |
| - stack_expr($$).set(ID_identifier, PARSER.current_scope->prefix+id2string(base_name)); |
| 4429 | + stack_expr($$).set(ID_identifier, PARSER.scopes.current_scope->prefix+id2string(base_name)); |
4430 | 4430 | }
|
4431 | 4431 | ;
|
4432 | 4432 |
|
|
0 commit comments