Changes in src/Parser/ParseNode.h [413ad05:f39096c]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r413ad05 rf39096c 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 2 8 21:14:51201613 // Update Count : 5 7512 // 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 //############################################################################## … … 126 126 bool extension = false; 127 127 std::unique_ptr<Expression> expr; 128 }; // ExpressionNode128 }; 129 129 130 130 template< typename T > … … 145 145 SizeOf, AlignOf, OffsetOf, Plus, Minus, Mul, Div, Mod, Or, And, 146 146 BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 147 Assign, AtAssn,MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,147 Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn, 148 148 Index, Range, 149 149 // monadic 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( const TypeData *, const 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; … … 308 307 309 308 Type *buildType( TypeData *type ); 310 //Type::Qualifiers buildQualifiers( const TypeData::Qualifiers & qualifiers );311 309 312 310 static inline Type * maybeMoveBuildType( const DeclarationNode *orig ) {
Note:
See TracChangeset
for help on using the changeset viewer.