Changes in src/Parser/DeclarationNode.cc [b0d9ff7:9e7236f4]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rb0d9ff7 r9e7236f4 253 253 } // DeclarationNode::newAggregate 254 254 255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, bool typed,DeclarationNode * base) {255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, DeclarationNode * base) { 256 256 DeclarationNode * newnode = new DeclarationNode; 257 257 newnode->type = new TypeData( TypeData::Enum ); … … 260 260 newnode->type->enumeration.body = body; 261 261 newnode->type->enumeration.anon = name == nullptr; 262 newnode->type->enumeration.typed = typed;263 262 if ( base && base->type) { 264 263 newnode->type->base = base->type; 265 264 } // if 266 265 266 // Check: if base has TypeData 267 267 return newnode; 268 268 } // DeclarationNode::newEnum … … 284 284 285 285 DeclarationNode * DeclarationNode::newEnumValueGeneric( const string * name, InitializerNode * init ) { 286 if ( init ) { 287 if ( init->get_expression() ) { 286 if ( init ) { // list init {} or a singleInit 287 if ( init->get_expression() ) { // singleInit 288 288 return newEnumConstant( name, init->get_expression() ); 289 } else { 289 } else { // TODO: listInit 290 290 DeclarationNode * newnode = newName( name ); 291 291 newnode->initializer = init; … … 293 293 } // if 294 294 } else { 295 return newName( name ); 295 return newName( name ); // Not explicitly inited enum value; 296 296 } // if 297 297 } // DeclarationNode::newEnumValueGeneric
Note:
See TracChangeset
for help on using the changeset viewer.