Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rf39096c rc1c1112  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug 21 11:53:59 2016
    13 // Update Count     : 546
     12// Last Modified On : Thu Aug 25 21:00:08 2016
     13// Update Count     : 563
    1414//
    1515
     
    9999        InitializerNode *kids;
    100100        bool maybeConstructed;
    101 };
     101}; // InitializerNode
    102102
    103103//##############################################################################
     
    109109        ExpressionNode( const ExpressionNode &other );
    110110        virtual ~ExpressionNode() {}
    111         virtual ExpressionNode *clone() const { return expr ? new ExpressionNode( expr->clone() ) : nullptr; }
     111        virtual ExpressionNode *clone() const { assert( false ); return nullptr; }
    112112
    113113        bool get_extension() const { return extension; }
     
    126126        bool extension = false;
    127127        std::unique_ptr<Expression> expr;
    128 };
     128}; // ExpressionNode
    129129
    130130template< typename T >
     
    150150        UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
    151151        Ctor, Dtor,
    152 };
     152}; // OperKinds
    153153
    154154struct LabelNode {
     
    196196class DeclarationNode : public ParseNode {
    197197  public:
    198         enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic };
     198        enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoOfQualifier };
    199199        enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, };
    200200        enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
     
    204204        enum BuiltinType { Valist };
    205205
     206        static const char *qualifierName[];
    206207        static const char *storageName[];
    207         static const char *qualifierName[];
    208208        static const char *basicTypeName[];
    209209        static const char *modifierName[];
     
    214214        static DeclarationNode *newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle = false );
    215215        static DeclarationNode *newQualifier( Qualifier );
     216        static DeclarationNode *newForall( DeclarationNode *);
    216217        static DeclarationNode *newStorageClass( StorageClass );
    217218        static DeclarationNode *newBasicType( BasicType );
    218219        static DeclarationNode *newModifier( Modifier );
    219         static DeclarationNode *newForall( DeclarationNode *);
     220        static DeclarationNode *newBuiltinType( BuiltinType );
    220221        static DeclarationNode *newFromTypedef( std::string *);
    221222        static DeclarationNode *newAggregate( Aggregate kind, const std::string *name, ExpressionNode *actuals, DeclarationNode *fields, bool body );
     
    236237        static DeclarationNode *newAttr( std::string *, ExpressionNode *expr );
    237238        static DeclarationNode *newAttr( std::string *, DeclarationNode *type );
    238         static DeclarationNode *newBuiltinType( BuiltinType );
    239239
    240240        DeclarationNode();
     
    243243
    244244        DeclarationNode *addQualifiers( DeclarationNode *);
     245        void checkQualifiers( TypeData *, TypeData * );
    245246        DeclarationNode *copyStorageClasses( DeclarationNode *);
    246247        DeclarationNode *addType( DeclarationNode *);
     
    285286        bool get_extension() const { return extension; }
    286287        DeclarationNode *set_extension( bool exten ) { extension = exten; return this; }
    287   private:
     288  public:
    288289        // StorageClass buildStorageClass() const;
    289290        // bool buildFuncSpecifier( StorageClass key ) const;
Note: See TracChangeset for help on using the changeset viewer.