Changes in src/Parser/ParseNode.h [630a82a:5721a6d]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r630a82a r5721a6d 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 8 16:27:20201613 // Update Count : 20512 // Last Modified On : Mon Feb 1 13:32:32 2016 13 // Update Count : 184 14 14 // 15 15 … … 329 329 enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary }; 330 330 enum Modifier { Signed, Unsigned, Short, Long }; 331 enum Aggregate { Struct, Union, Trait };331 enum Aggregate { Struct, Union, Context }; 332 332 enum TypeClass { Type, Dtype, Ftype }; 333 enum BuiltinType { Valist };334 333 335 334 static const char *storageName[]; … … 339 338 static const char *aggregateName[]; 340 339 static const char *typeClassName[]; 341 static const char *builtinTypeName[];342 340 343 341 static DeclarationNode *newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle = false ); … … 354 352 static DeclarationNode *newFromTypeGen( std::string *, ExpressionNode *params ); 355 353 static DeclarationNode *newTypeParam( TypeClass, std::string *); 356 static DeclarationNode *new Trait( std::string *name, DeclarationNode *params, DeclarationNode *asserts );357 static DeclarationNode *new TraitUse( std::string *name, ExpressionNode *params );354 static DeclarationNode *newContext( std::string *name, DeclarationNode *params, DeclarationNode *asserts ); 355 static DeclarationNode *newContextUse( std::string *name, ExpressionNode *params ); 358 356 static DeclarationNode *newTypeDecl( std::string *name, DeclarationNode *typeParams ); 359 357 static DeclarationNode *newPointer( DeclarationNode *qualifiers ); … … 365 363 static DeclarationNode *newAttr( std::string *, ExpressionNode *expr ); 366 364 static DeclarationNode *newAttr( std::string *, DeclarationNode *type ); 367 static DeclarationNode *newBuiltinType( BuiltinType );368 365 369 366 DeclarationNode *addQualifiers( DeclarationNode *); … … 404 401 LinkageSpec::Type get_linkage() const { return linkage; } 405 402 DeclarationNode *extractAggregate() const; 406 ExpressionNode *get_enumeratorValue() const { return enumeratorValue; }407 403 408 404 DeclarationNode(); … … 417 413 std::list< std::string > attributes; 418 414 ExpressionNode *bitfieldWidth; 419 ExpressionNode *enumeratorValue;420 415 InitializerNode *initializer; 421 416 bool hasEllipsis; … … 535 530 bool aggregate; 536 531 ExpressionNode *designator; // may be list 537 InitializerNode *kids;538 };539 540 class CompoundLiteralNode : public ExpressionNode {541 public:542 CompoundLiteralNode( DeclarationNode *type, InitializerNode *kids );543 CompoundLiteralNode( const CompoundLiteralNode &type );544 ~CompoundLiteralNode();545 546 virtual CompoundLiteralNode *clone() const;547 548 DeclarationNode *get_type() const { return type; }549 CompoundLiteralNode *set_type( DeclarationNode *t ) { type = t; return this; }550 551 InitializerNode *get_initializer() const { return kids; }552 CompoundLiteralNode *set_initializer( InitializerNode *k ) { kids = k; return this; }553 554 void print( std::ostream &, int indent = 0 ) const;555 void printOneLine( std::ostream &, int indent = 0 ) const;556 557 virtual Expression *build() const;558 private:559 DeclarationNode *type;560 532 InitializerNode *kids; 561 533 };
Note:
See TracChangeset
for help on using the changeset viewer.