Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r974906e2 r5721a6d  
    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 : Rob Schluntz
    12 // Last Modified On : Thu Jan 07 13:17:46 2016
    13 // Update Count     : 177
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Feb  1 13:32:32 2016
     13// Update Count     : 184
    1414//
    1515
     
    2121#include <iterator>
    2222
    23 #include "utility.h"
     23#include "Common/utility.h"
    2424#include "Parser/LinkageSpec.h"
    2525#include "SynTree/Type.h"
    2626//#include "SynTree/Declaration.h"
    27 #include "UniqueName.h"
     27#include "Common/UniqueName.h"
    2828
    2929class ExpressionNode;
     
    108108
    109109        ConstantNode( Type, std::string * );
     110        ConstantNode( const ConstantNode &other ) : value( *new std::string( other.value ) ) {};
    110111        ~ConstantNode() { delete &value; }
    111112
     
    174175class OperatorNode : public ExpressionNode {
    175176  public:
    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,
     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
    182186                                UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
    183                                 Ctor, Dtor,
    184187        };
    185188
     
    199202  private:
    200203        Type type;
    201         static const char *OpName[];
    202204};
    203205
     
    307309        ValofExprNode( const ValofExprNode &other );
    308310        ~ValofExprNode();
    309 
     311 
    310312        virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); }
    311313
     
    330332        enum TypeClass { Type, Dtype, Ftype };
    331333
    332         static const char *storageName[];
     334        static const char *storageName[]; 
    333335        static const char *qualifierName[];
    334336        static const char *basicTypeName[];
     
    420422class StatementNode : public ParseNode {
    421423  public:
    422         enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru,
     424        enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru, 
    423425                                While, Do,        For,
    424426                                Goto,  Continue,  Break,   Return,  Throw,
     
    518520        ExpressionNode *get_designators() const { return designator; }
    519521
    520         InitializerNode *set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
    521         bool get_maybeConstructed() const { return maybeConstructed; }
    522 
    523522        InitializerNode *next_init() const { return kids; }
    524523
     
    532531        ExpressionNode *designator; // may be list
    533532        InitializerNode *kids;
    534         bool maybeConstructed;
    535533};
    536534
Note: See TracChangeset for help on using the changeset viewer.