Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rb0d9ff7 r1e30df7  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 14 17:36:57 2021
    13 // Update Count     : 1154
     12// Last Modified On : Mon Aug  8 17:07:00 2022
     13// Update Count     : 1185
    1414//
    1515
     
    128128        if ( name ) {
    129129                os << *name << ": ";
    130         } else {
    131                 os << "unnamed: ";
    132130        } // if
    133131
     
    154152                initializer->printOneLine( os );
    155153                os << " maybe constructed? " << initializer->get_maybeConstructed();
    156 
    157         } // if
     154        } // if
     155
     156        for ( Attribute * attr: reverseIterate( attributes ) ) {
     157                os << string( indent + 2, ' ' ) << "attr " << attr->name.c_str();
     158        } // for
    158159
    159160        os << endl;
     
    243244        newnode->type = new TypeData( TypeData::Aggregate );
    244245        newnode->type->aggregate.kind = kind;
    245         newnode->type->aggregate.name =  name == nullptr ? new string( DeclarationNode::anonymous.newName() ) : name;
     246        newnode->type->aggregate.name = name == nullptr ? new string( DeclarationNode::anonymous.newName() ) : name;
    246247        newnode->type->aggregate.actuals = actuals;
    247248        newnode->type->aggregate.fields = fields;
     
    262263        newnode->type->enumeration.typed = typed;
    263264        if ( base && base->type)  {
    264                 newnode->type->base = base->type;       
     265                newnode->type->base = base->type;
    265266        } // if
    266267
     
    296297        } // if
    297298} // DeclarationNode::newEnumValueGeneric
     299
     300DeclarationNode * DeclarationNode::newEnumInLine( const string name ) {
     301        DeclarationNode * newnode = newName( new std::string(name) );
     302        newnode->enumInLine = true;
     303        return newnode;
     304}
    298305
    299306DeclarationNode * DeclarationNode::newFromTypedef( const string * name ) {
     
    504511                        } // for
    505512                        // src is the new item being added and has a single bit
    506                 } else if ( ! src->storageClasses.is_threadlocal ) { // conflict ?
     513                } else if ( ! src->storageClasses.is_threadlocal_any() ) { // conflict ?
    507514                        appendError( error, string( "conflicting " ) + Type::StorageClassesNames[storageClasses.ffs()] +
    508515                                                 " & " + Type::StorageClassesNames[src->storageClasses.ffs()] );
     
    518525        storageClasses |= q->storageClasses;
    519526
    520         for ( Attribute *attr: reverseIterate( q->attributes ) ) {
     527        for ( Attribute * attr: reverseIterate( q->attributes ) ) {
    521528                attributes.push_front( attr->clone() );
    522529        } // for
     
    683690        } // if
    684691        delete o;
     692
    685693        return this;
    686694}
Note: See TracChangeset for help on using the changeset viewer.