Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r630a82a r5721a6d  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  8 16:27:20 2016
    13 // Update Count     : 205
     12// Last Modified On : Mon Feb  1 13:32:32 2016
     13// Update Count     : 184
    1414//
    1515
     
    329329        enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
    330330        enum Modifier  { Signed, Unsigned, Short, Long };
    331         enum Aggregate { Struct, Union, Trait };
     331        enum Aggregate { Struct, Union, Context };
    332332        enum TypeClass { Type, Dtype, Ftype };
    333         enum BuiltinType { Valist };
    334333
    335334        static const char *storageName[]; 
     
    339338        static const char *aggregateName[];
    340339        static const char *typeClassName[];
    341         static const char *builtinTypeName[];
    342340
    343341        static DeclarationNode *newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle = false );
     
    354352        static DeclarationNode *newFromTypeGen( std::string *, ExpressionNode *params );
    355353        static DeclarationNode *newTypeParam( TypeClass, std::string *);
    356         static DeclarationNode *newTrait( std::string *name, DeclarationNode *params, DeclarationNode *asserts );
    357         static DeclarationNode *newTraitUse( std::string *name, ExpressionNode *params );
     354        static DeclarationNode *newContext( std::string *name, DeclarationNode *params, DeclarationNode *asserts );
     355        static DeclarationNode *newContextUse( std::string *name, ExpressionNode *params );
    358356        static DeclarationNode *newTypeDecl( std::string *name, DeclarationNode *typeParams );
    359357        static DeclarationNode *newPointer( DeclarationNode *qualifiers );
     
    365363        static DeclarationNode *newAttr( std::string *, ExpressionNode *expr );
    366364        static DeclarationNode *newAttr( std::string *, DeclarationNode *type );
    367         static DeclarationNode *newBuiltinType( BuiltinType );
    368365
    369366        DeclarationNode *addQualifiers( DeclarationNode *);
     
    404401        LinkageSpec::Type get_linkage() const { return linkage; }
    405402        DeclarationNode *extractAggregate() const;
    406         ExpressionNode *get_enumeratorValue() const { return enumeratorValue; }
    407403
    408404        DeclarationNode();
     
    417413        std::list< std::string > attributes;
    418414        ExpressionNode *bitfieldWidth;
    419         ExpressionNode *enumeratorValue;
    420415        InitializerNode *initializer;
    421416        bool hasEllipsis;
     
    535530        bool aggregate;
    536531        ExpressionNode *designator; // may be list
    537         InitializerNode *kids;
    538 };
    539 
    540 class CompoundLiteralNode : public ExpressionNode {
    541   public:
    542         CompoundLiteralNode( DeclarationNode *type, InitializerNode *kids );
    543         CompoundLiteralNode( const CompoundLiteralNode &type );
    544         ~CompoundLiteralNode();
    545 
    546         virtual CompoundLiteralNode *clone() const;
    547 
    548         DeclarationNode *get_type() const { return type; }
    549         CompoundLiteralNode *set_type( DeclarationNode *t ) { type = t; return this; }
    550 
    551         InitializerNode *get_initializer() const { return kids; }
    552         CompoundLiteralNode *set_initializer( InitializerNode *k ) { kids = k; return this; }
    553 
    554         void print( std::ostream &, int indent = 0 ) const;
    555         void printOneLine( std::ostream &, int indent = 0 ) const;
    556 
    557         virtual Expression *build() const;
    558   private:
    559         DeclarationNode *type;
    560532        InitializerNode *kids;
    561533};
Note: See TracChangeset for help on using the changeset viewer.