Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rb0d9ff7 r9e7236f4  
    253253} // DeclarationNode::newAggregate
    254254
    255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, bool typed, DeclarationNode * base) {
     255DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, DeclarationNode * base) {
    256256        DeclarationNode * newnode = new DeclarationNode;
    257257        newnode->type = new TypeData( TypeData::Enum );
     
    260260        newnode->type->enumeration.body = body;
    261261        newnode->type->enumeration.anon = name == nullptr;
    262         newnode->type->enumeration.typed = typed;
    263262        if ( base && base->type)  {
    264263                newnode->type->base = base->type;       
    265264        } // if
    266265
     266        // Check: if base has TypeData
    267267        return newnode;
    268268} // DeclarationNode::newEnum
     
    284284
    285285DeclarationNode * 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
    288288                        return newEnumConstant( name, init->get_expression() );
    289                 } else {
     289                } else { // TODO: listInit
    290290                        DeclarationNode * newnode = newName( name );
    291291                        newnode->initializer = init;
     
    293293                } // if
    294294        } else {
    295                 return newName( name );
     295                return newName( name ); // Not explicitly inited enum value;
    296296        } // if
    297297} // DeclarationNode::newEnumValueGeneric
Note: See TracChangeset for help on using the changeset viewer.