- Timestamp:
- Apr 4, 2024, 2:37:10 PM (9 months ago)
- Branches:
- master
- Children:
- af746cc, b6a71bc, cb98d9d
- Parents:
- 1cfe640
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r1cfe640 rd9bad51 225 225 } // DeclarationNode::newEnumValueGeneric 226 226 227 DeclarationNode * DeclarationNode::newEnumInLine( const st ringname ) {228 DeclarationNode * newnode = newName( n ew std::string(name));227 DeclarationNode * DeclarationNode::newEnumInLine( const std::string * name ) { 228 DeclarationNode * newnode = newName( name ); 229 229 newnode->enumInLine = true; 230 230 return newnode; -
src/Parser/DeclarationNode.h
r1cfe640 rd9bad51 30 30 static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant ); 31 31 static DeclarationNode * newEnumValueGeneric( const std::string * name, InitializerNode * init ); 32 static DeclarationNode * newEnumInLine( const std::string name );32 static DeclarationNode * newEnumInLine( const std::string * name ); 33 33 static DeclarationNode * newName( const std::string * ); 34 34 static DeclarationNode * newTypeParam( ast::TypeDecl::Kind, const std::string * ); -
src/Parser/parser.yy
r1cfe640 rd9bad51 2815 2815 { $$ = DeclarationNode::newEnumValueGeneric( $2, $3 ); } 2816 2816 | INLINE type_name 2817 { $$ = DeclarationNode::newEnumInLine( *$2->symbolic.name ); } 2817 { 2818 $$ = DeclarationNode::newEnumInLine( $2->symbolic.name ); 2819 $2->symbolic.name = nullptr; 2820 delete $2; 2821 } 2818 2822 | enumerator_list ',' visible_hide_opt identifier_or_type_name enumerator_value_opt 2819 2823 { $$ = $1->set_last( DeclarationNode::newEnumValueGeneric( $4, $5 ) ); }
Note: See TracChangeset
for help on using the changeset viewer.