Changeset 1db21619 for src/Parser/ParseNode.h
- Timestamp:
- Jul 16, 2015, 5:28:24 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 994ec2c
- Parents:
- 724c2b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r724c2b6 r1db21619 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 2 17:57:05 201513 // Update Count : 8412 // Last Modified On : Tue Jul 14 14:58:25 2015 13 // Update Count : 91 14 14 // 15 15 … … 265 265 class DeclarationNode : public ParseNode { 266 266 public: 267 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic , Attribute};267 enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic }; 268 268 enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, }; 269 269 enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary }; … … 352 352 std::string name; 353 353 std::list< StorageClass > storageClasses; 354 std::list< std::string > attributes; 354 355 ExpressionNode *bitfieldWidth; 355 356 InitializerNode *initializer; … … 358 359 359 360 static UniqueName anonymous; 360 }; 361 }; // DeclarationNode 361 362 362 363 class StatementNode : public ParseNode { … … 380 381 static StatementNode *newCatchStmt( DeclarationNode *d = 0, StatementNode *s = 0, bool catchRestP = false ); 381 382 382 void set_control( ExpressionNode * ); 383 StatementNode * set_block( StatementNode * ); 384 385 ExpressionNode *get_control() const ; 386 StatementNode *get_block() const; 387 StatementNode::Type get_type() const; 383 StatementNode *set_block( StatementNode *b ) { block = b; return this; } 384 StatementNode *get_block() const { return block; } 385 386 void set_control( ExpressionNode *c ) { control = c; } 387 ExpressionNode *get_control() const { return control; } 388 389 StatementNode::Type get_type() const { return type; } 388 390 389 391 StatementNode *add_label( const std::string * ); 390 std::list<std::string> *get_labels() const;392 const std::list<std::string> &get_labels() const { return labels; } 391 393 392 394 void addDeclaration( DeclarationNode *newDecl ) { decl = newDecl; } … … 409 411 ExpressionNode *control; 410 412 StatementNode *block; 411 std::list<std::string> *labels;413 std::list<std::string> labels; 412 414 std::string *target; // target label for jump statements 413 415 DeclarationNode *decl; 414 416 415 417 bool isCatchRest; 416 }; 418 }; // StatementNode 417 419 418 420 class CompoundStmtNode : public StatementNode {
Note: See TracChangeset
for help on using the changeset viewer.