Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r5721a6d r974906e2  
    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 : Mon Feb  1 13:32:32 2016
    13 // Update Count     : 184
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Thu Jan 07 13:17:46 2016
     13// Update Count     : 177
    1414//
    1515
     
    2121#include <iterator>
    2222
    23 #include "Common/utility.h"
     23#include "utility.h"
    2424#include "Parser/LinkageSpec.h"
    2525#include "SynTree/Type.h"
    2626//#include "SynTree/Declaration.h"
    27 #include "Common/UniqueName.h"
     27#include "UniqueName.h"
    2828
    2929class ExpressionNode;
     
    108108
    109109        ConstantNode( Type, std::string * );
    110         ConstantNode( const ConstantNode &other ) : value( *new std::string( other.value ) ) {};
    111110        ~ConstantNode() { delete &value; }
    112111
     
    175174class OperatorNode : public ExpressionNode {
    176175  public:
    177         enum Type { TupleC, Comma, TupleFieldSel, // n-adic
    178                                 // triadic
    179                                 Cond, NCond,
    180                                 // 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,
    183                                 Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,
    184                                 Index, FieldSel, PFieldSel, Range,
    185                                 // monadic
     176        enum Type { TupleC, Comma, TupleFieldSel,
     177                                Cond, NCond,
     178                                SizeOf, AlignOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And,
     179                                BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq,
     180                                Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn,
     181                                ERAssn, OrAssn, Index, FieldSel, PFieldSel, Range,
    186182                                UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
     183                                Ctor, Dtor,
    187184        };
    188185
     
    202199  private:
    203200        Type type;
     201        static const char *OpName[];
    204202};
    205203
     
    309307        ValofExprNode( const ValofExprNode &other );
    310308        ~ValofExprNode();
    311  
     309
    312310        virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); }
    313311
     
    332330        enum TypeClass { Type, Dtype, Ftype };
    333331
    334         static const char *storageName[]; 
     332        static const char *storageName[];
    335333        static const char *qualifierName[];
    336334        static const char *basicTypeName[];
     
    422420class StatementNode : public ParseNode {
    423421  public:
    424         enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru, 
     422        enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru,
    425423                                While, Do,        For,
    426424                                Goto,  Continue,  Break,   Return,  Throw,
     
    520518        ExpressionNode *get_designators() const { return designator; }
    521519
     520        InitializerNode *set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
     521        bool get_maybeConstructed() const { return maybeConstructed; }
     522
    522523        InitializerNode *next_init() const { return kids; }
    523524
     
    531532        ExpressionNode *designator; // may be list
    532533        InitializerNode *kids;
     534        bool maybeConstructed;
    533535};
    534536
Note: See TracChangeset for help on using the changeset viewer.