Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r44a81853 r8f60f0b  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 18 16:20:43 2017
    13 // Update Count     : 650
     12// Last Modified On : Tue Dec 13 15:37:33 2016
     13// Update Count     : 643
    1414//
    1515
     
    3535class ExpressionNode;
    3636class InitializerNode;
    37 class Attribute;
    3837
    3938//##############################################################################
     
    243242        static DeclarationNode * newTuple( DeclarationNode * members );
    244243        static DeclarationNode * newTypeof( ExpressionNode * expr );
    245         static DeclarationNode * newAttr( std::string *, ExpressionNode * expr ); // @ attributes
    246         static DeclarationNode * newAttr( std::string *, DeclarationNode * type ); // @ attributes
    247         static DeclarationNode * newAttribute( std::string *, ExpressionNode * expr = nullptr ); // gcc attributes
     244        static DeclarationNode * newAttr( std::string *, ExpressionNode * expr );
     245        static DeclarationNode * newAttr( std::string *, DeclarationNode * type );
    248246
    249247        DeclarationNode();
     
    318316        LinkageSpec::Spec linkage;
    319317        ConstantExpr *asmName;
    320         std::list< Attribute * > attributes;
     318        std::list< std::string > attributes;
    321319        InitializerNode * initializer;
    322320        bool extension = false;
     
    346344        Statement * build() const { return const_cast<StatementNode*>(this)->stmt.release(); }
    347345
    348         virtual StatementNode * add_label( const std::string * name, DeclarationNode * attr = nullptr ) {
    349                 stmt->get_labels().emplace_back( * name, nullptr, attr ? std::move( attr->attributes ) : std::list< Attribute * > {} );
    350                 delete attr;
     346        virtual StatementNode * add_label( const std::string * name ) {
     347                stmt->get_labels().emplace_back( * name );
    351348                delete name;
    352349                return this;
Note: See TracChangeset for help on using the changeset viewer.