Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r630a82a r3aba311  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ParseNode.h -- 
     7// ParseNode.h --
    88//
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:28:16 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  8 16:27:20 2016
    13 // Update Count     : 205
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Mon Apr 04 17:04:22 2016
     13// Update Count     : 190
    1414//
    1515
     
    108108
    109109        ConstantNode( Type, std::string * );
    110         ConstantNode( const ConstantNode &other ) : value( *new std::string( other.value ) ) {};
     110        ConstantNode( const ConstantNode &other ) : type( other.type ), btype( other.btype), value( *new std::string( other.value ) ) {};
    111111        ~ConstantNode() { delete &value; }
    112112
     
    177177        enum Type { TupleC, Comma, TupleFieldSel, // n-adic
    178178                                // triadic
    179                                 Cond, NCond, 
     179                                Cond, NCond,
    180180                                // diadic
    181                                 SizeOf, AlignOf, OffsetOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And, 
    182                                 BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 
     181                                SizeOf, AlignOf, OffsetOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And,
     182                                BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq,
    183183                                Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,
    184184                                Index, FieldSel, PFieldSel, Range,
     
    309309        ValofExprNode( const ValofExprNode &other );
    310310        ~ValofExprNode();
    311  
     311
    312312        virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); }
    313313
     
    333333        enum BuiltinType { Valist };
    334334
    335         static const char *storageName[]; 
     335        static const char *storageName[];
    336336        static const char *qualifierName[];
    337337        static const char *basicTypeName[];
     
    427427class StatementNode : public ParseNode {
    428428  public:
    429         enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru, 
     429        enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru,
    430430                                While, Do,        For,
    431431                                Goto,  Continue,  Break,   Return,  Throw,
     
    535535        bool aggregate;
    536536        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;
    560537        InitializerNode *kids;
    561538};
Note: See TracChangeset for help on using the changeset viewer.