Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r374cb117 r9e7236f4  
    253253} // DeclarationNode::newAggregate
    254254
    255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body) {
     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        if ( base && base->type)  {
     263                newnode->type->base = base->type;       
     264        } // if
     265
     266        // Check: if base has TypeData
    262267        return newnode;
    263268} // DeclarationNode::newEnum
     
    290295                return newName( name ); // Not explicitly inited enum value;
    291296        } // if
    292 } // DeclarationNode::newEnumGeneric
     297} // DeclarationNode::newEnumValueGeneric
    293298
    294299DeclarationNode * DeclarationNode::newFromTypedef( const string * name ) {
Note: See TracChangeset for help on using the changeset viewer.