Changes in src/Parser/ParseNode.h [5721a6d:974906e2]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r5721a6d r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ParseNode.h -- 7 // ParseNode.h -- 8 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:28:16 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Feb 1 13:32:32201613 // Update Count : 1 8411 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 13:17:46 2016 13 // Update Count : 177 14 14 // 15 15 … … 21 21 #include <iterator> 22 22 23 #include " Common/utility.h"23 #include "utility.h" 24 24 #include "Parser/LinkageSpec.h" 25 25 #include "SynTree/Type.h" 26 26 //#include "SynTree/Declaration.h" 27 #include " Common/UniqueName.h"27 #include "UniqueName.h" 28 28 29 29 class ExpressionNode; … … 108 108 109 109 ConstantNode( Type, std::string * ); 110 ConstantNode( const ConstantNode &other ) : value( *new std::string( other.value ) ) {};111 110 ~ConstantNode() { delete &value; } 112 111 … … 175 174 class OperatorNode : public ExpressionNode { 176 175 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, 186 182 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress, 183 Ctor, Dtor, 187 184 }; 188 185 … … 202 199 private: 203 200 Type type; 201 static const char *OpName[]; 204 202 }; 205 203 … … 309 307 ValofExprNode( const ValofExprNode &other ); 310 308 ~ValofExprNode(); 311 309 312 310 virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); } 313 311 … … 332 330 enum TypeClass { Type, Dtype, Ftype }; 333 331 334 static const char *storageName[]; 332 static const char *storageName[]; 335 333 static const char *qualifierName[]; 336 334 static const char *basicTypeName[]; … … 422 420 class StatementNode : public ParseNode { 423 421 public: 424 enum Type { Exp, If, Switch, Case, Default, Choose, Fallthru, 422 enum Type { Exp, If, Switch, Case, Default, Choose, Fallthru, 425 423 While, Do, For, 426 424 Goto, Continue, Break, Return, Throw, … … 520 518 ExpressionNode *get_designators() const { return designator; } 521 519 520 InitializerNode *set_maybeConstructed( bool value ) { maybeConstructed = value; return this; } 521 bool get_maybeConstructed() const { return maybeConstructed; } 522 522 523 InitializerNode *next_init() const { return kids; } 523 524 … … 531 532 ExpressionNode *designator; // may be list 532 533 InitializerNode *kids; 534 bool maybeConstructed; 533 535 }; 534 536
Note:
See TracChangeset
for help on using the changeset viewer.