Changeset 4941716
- Timestamp:
- Aug 13, 2024, 11:26:54 AM (3 months ago)
- Branches:
- master
- Children:
- 661e7b0
- Parents:
- dee680c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rdee680c r4941716 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 12 10:21:46 202413 // Update Count : 67 3712 // Last Modified On : Tue Aug 13 11:25:16 2024 13 // Update Count : 6740 14 14 // 15 15 … … 952 952 } 953 953 | COUNTOF unary_expression 954 { 954 { $$ = new ExpressionNode( new ast::CountExpr( yylloc, maybeMoveBuild( $2 ) ) ); } 955 955 | COUNTOF '(' type_no_function ')' 956 956 { $$ = new ExpressionNode( new ast::CountExpr( yylloc, maybeMoveBuildType( $3 ) ) ); } … … 1626 1626 enum_key: 1627 1627 type_name 1628 { typedefTable.makeTypedef( *$1->symbolic.name, "enum_type_nobody 1" ); 1629 $$ = DeclarationNode::newEnum( $1->symbolic.name, nullptr, false, false ); } 1628 { 1629 typedefTable.makeTypedef( *$1->symbolic.name, "enum_type_nobody 1" ); 1630 $$ = DeclarationNode::newEnum( $1->symbolic.name, nullptr, false, false ); 1631 } 1630 1632 | ENUM identifier 1631 { typedefTable.makeTypedef( *$2, "enum_type_nobody 2" ); 1632 $$ = DeclarationNode::newEnum( $2, nullptr, false, false ); } 1633 { 1634 typedefTable.makeTypedef( *$2, "enum_type_nobody 2" ); 1635 $$ = DeclarationNode::newEnum( $2, nullptr, false, false ); 1636 } 1633 1637 | ENUM type_name 1634 { typedefTable.makeTypedef( *$2->symbolic.name, "enum_type_nobody 3" ); 1635 $$ = DeclarationNode::newEnum( $2->symbolic.name, nullptr, false, false ); } 1638 { 1639 typedefTable.makeTypedef( *$2->symbolic.name, "enum_type_nobody 3" ); 1640 $$ = DeclarationNode::newEnum( $2->symbolic.name, nullptr, false, false ); 1641 } 1636 1642 ; 1637 1643 … … 3238 3244 3239 3245 trait_declaring_list: // CFA 3240 type_specifier declarator 3246 // Cannot declare an aggregate or enumeration in a trait. 3247 type_specifier_nobody declarator 3241 3248 { $$ = $2->addType( $1 ); } 3242 3249 | trait_declaring_list ',' declarator 3243 3250 { $$ = $1->set_last( $1->cloneBaseType( $3 ) ); } 3251 | error 3252 { SemanticError( yylloc, "Possible cause is declaring an aggregate or enumeration type in a trait." ); $$ = nullptr; } 3244 3253 ; 3245 3254
Note: See TracChangeset
for help on using the changeset viewer.