Changes in src/Parser/ParseNode.h [c1c1112:f39096c]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rc1c1112 rf39096c 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 25 21:00:08201613 // Update Count : 5 6312 // Last Modified On : Sun Aug 21 11:53:59 2016 13 // Update Count : 546 14 14 // 15 15 … … 99 99 InitializerNode *kids; 100 100 bool maybeConstructed; 101 }; // InitializerNode101 }; 102 102 103 103 //############################################################################## … … 109 109 ExpressionNode( const ExpressionNode &other ); 110 110 virtual ~ExpressionNode() {} 111 virtual ExpressionNode *clone() const { assert( false ); returnnullptr; }111 virtual ExpressionNode *clone() const { return expr ? new ExpressionNode( expr->clone() ) : nullptr; } 112 112 113 113 bool get_extension() const { return extension; } … … 126 126 bool extension = false; 127 127 std::unique_ptr<Expression> expr; 128 }; // ExpressionNode128 }; 129 129 130 130 template< typename T > … … 150 150 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress, 151 151 Ctor, Dtor, 152 }; // OperKinds152 }; 153 153 154 154 struct LabelNode { … … 196 196 class DeclarationNode : public ParseNode { 197 197 public: 198 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic , NoOfQualifier};198 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic }; 199 199 enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, }; 200 200 enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary }; … … 204 204 enum BuiltinType { Valist }; 205 205 206 static const char *storageName[]; 206 207 static const char *qualifierName[]; 207 static const char *storageName[];208 208 static const char *basicTypeName[]; 209 209 static const char *modifierName[]; … … 214 214 static DeclarationNode *newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle = false ); 215 215 static DeclarationNode *newQualifier( Qualifier ); 216 static DeclarationNode *newForall( DeclarationNode *);217 216 static DeclarationNode *newStorageClass( StorageClass ); 218 217 static DeclarationNode *newBasicType( BasicType ); 219 218 static DeclarationNode *newModifier( Modifier ); 220 static DeclarationNode *new BuiltinType( BuiltinType);219 static DeclarationNode *newForall( DeclarationNode *); 221 220 static DeclarationNode *newFromTypedef( std::string *); 222 221 static DeclarationNode *newAggregate( Aggregate kind, const std::string *name, ExpressionNode *actuals, DeclarationNode *fields, bool body ); … … 237 236 static DeclarationNode *newAttr( std::string *, ExpressionNode *expr ); 238 237 static DeclarationNode *newAttr( std::string *, DeclarationNode *type ); 238 static DeclarationNode *newBuiltinType( BuiltinType ); 239 239 240 240 DeclarationNode(); … … 243 243 244 244 DeclarationNode *addQualifiers( DeclarationNode *); 245 void checkQualifiers( TypeData *, TypeData * );246 245 DeclarationNode *copyStorageClasses( DeclarationNode *); 247 246 DeclarationNode *addType( DeclarationNode *); … … 286 285 bool get_extension() const { return extension; } 287 286 DeclarationNode *set_extension( bool exten ) { extension = exten; return this; } 288 p ublic:287 private: 289 288 // StorageClass buildStorageClass() const; 290 289 // bool buildFuncSpecifier( StorageClass key ) const;
Note:
See TracChangeset
for help on using the changeset viewer.