- Timestamp:
- Jul 4, 2024, 1:47:46 AM (6 months ago)
- Branches:
- master
- Children:
- 8c55d34
- Parents:
- f8f298c
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cpp
rf8f298c r99f7f37 185 185 } // DeclarationNode::newAggregate 186 186 187 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, bool typed, DeclarationNode * base, EnumHiding hiding ) {187 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, bool isCfa, DeclarationNode * base, EnumHiding hiding ) { 188 188 DeclarationNode * newnode = newAggregate( ast::AggregateDecl::Enum, name, nullptr, constants, body ); 189 newnode->type->aggregate. typed = typed;189 newnode->type->aggregate.isCfa = isCfa; 190 190 newnode->type->aggregate.hiding = hiding; 191 191 if ( base ) { 192 assert( typed);192 assert( isCfa ); 193 193 assert( base->type ); 194 194 newnode->type->base = base->type; … … 541 541 newaggr->aggregate.body = false; 542 542 newaggr->aggregate.anon = oldaggr->aggregate.anon; 543 newaggr->aggregate. typed = oldaggr->aggregate.typed;543 newaggr->aggregate.isCfa = oldaggr->aggregate.isCfa; 544 544 newaggr->aggregate.hiding = oldaggr->aggregate.hiding; 545 545 swap( newaggr, oldaggr ); -
src/Parser/TypeData.cpp
rf8f298c r99f7f37 84 84 aggregate.body = false; 85 85 aggregate.anon = false; 86 aggregate. typed= false;86 aggregate.isCfa = false; 87 87 aggregate.hiding = EnumHiding::Visible; 88 88 break; … … 218 218 newtype->aggregate.body = aggregate.body; 219 219 newtype->aggregate.anon = aggregate.anon; 220 newtype->aggregate.isCfa = aggregate.isCfa; 221 newtype->aggregate.hiding = aggregate.hiding; 220 222 break; 221 223 case AggregateInst: … … 1456 1458 td->location, 1457 1459 *td->aggregate.name, 1458 td->aggregate. typed,1460 td->aggregate.isCfa, 1459 1461 std::move( attributes ), 1460 1462 linkage, -
src/Parser/TypeData.hpp
rf8f298c r99f7f37 60 60 // Is this type anonymous? (Name can still be set to generated name.) 61 61 bool anon; 62 // Is this a typed enumeration? Type may be stored in base.63 bool typed;62 // Is this a cfa enumeration? Type stored in base. 63 bool isCfa; 64 64 EnumHiding hiding; 65 65 };
Note: See TracChangeset
for help on using the changeset viewer.