Changes in src/Parser/ParseNode.h [f39096c:c1c1112]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rf39096c rc1c1112 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 21 11:53:59201613 // Update Count : 5 4612 // Last Modified On : Thu Aug 25 21:00:08 2016 13 // Update Count : 563 14 14 // 15 15 … … 99 99 InitializerNode *kids; 100 100 bool maybeConstructed; 101 }; 101 }; // InitializerNode 102 102 103 103 //############################################################################## … … 109 109 ExpressionNode( const ExpressionNode &other ); 110 110 virtual ~ExpressionNode() {} 111 virtual ExpressionNode *clone() const { return expr ? new ExpressionNode( expr->clone() ) :nullptr; }111 virtual ExpressionNode *clone() const { assert( false ); return nullptr; } 112 112 113 113 bool get_extension() const { return extension; } … … 126 126 bool extension = false; 127 127 std::unique_ptr<Expression> expr; 128 }; 128 }; // ExpressionNode 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 }; 152 }; // OperKinds 153 153 154 154 struct LabelNode { … … 196 196 class DeclarationNode : public ParseNode { 197 197 public: 198 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic };198 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoOfQualifier }; 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 *qualifierName[]; 206 207 static const char *storageName[]; 207 static const char *qualifierName[];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 *); 216 217 static DeclarationNode *newStorageClass( StorageClass ); 217 218 static DeclarationNode *newBasicType( BasicType ); 218 219 static DeclarationNode *newModifier( Modifier ); 219 static DeclarationNode *new Forall( DeclarationNode *);220 static DeclarationNode *newBuiltinType( BuiltinType ); 220 221 static DeclarationNode *newFromTypedef( std::string *); 221 222 static DeclarationNode *newAggregate( Aggregate kind, const std::string *name, ExpressionNode *actuals, DeclarationNode *fields, bool body ); … … 236 237 static DeclarationNode *newAttr( std::string *, ExpressionNode *expr ); 237 238 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 * ); 245 246 DeclarationNode *copyStorageClasses( DeclarationNode *); 246 247 DeclarationNode *addType( DeclarationNode *); … … 285 286 bool get_extension() const { return extension; } 286 287 DeclarationNode *set_extension( bool exten ) { extension = exten; return this; } 287 p rivate:288 public: 288 289 // StorageClass buildStorageClass() const; 289 290 // bool buildFuncSpecifier( StorageClass key ) const;
Note:
See TracChangeset
for help on using the changeset viewer.