Changeset 6ac5223 for src/Parser/ParseNode.h
- Timestamp:
- Aug 17, 2017, 3:42:21 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e50e9ff
- Parents:
- 97e3296 (diff), 21f0aa8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r97e3296 r6ac5223 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Th u Aug 10 16:54:00 201713 // Update Count : 7 8912 // Last Modified On : Thr Aug 17 13:46:00 2017 13 // Update Count : 795 14 14 // 15 15 16 16 #pragma once 17 17 18 #include <string> 19 #include <list> 20 #include <iterator> 21 #include <memory> 22 23 #include "Parser/LinkageSpec.h" 24 #include "SynTree/Type.h" 25 #include "SynTree/Expression.h" 26 #include "SynTree/Statement.h" 27 #include "SynTree/Label.h" 28 #include "Common/utility.h" 29 #include "Common/UniqueName.h" 30 18 #include <algorithm> // for move 19 #include <cassert> // for assert, assertf 20 #include <iosfwd> // for ostream 21 #include <iterator> // for back_insert_iterator 22 #include <list> // for list 23 #include <memory> // for unique_ptr, pointer_traits 24 #include <string> // for string 25 26 #include "Common/CodeLocation.h" // for CodeLocation 27 #include "Common/SemanticError.h" // for SemanticError 28 #include "Common/UniqueName.h" // for UniqueName 29 #include "Common/utility.h" // for maybeClone, maybeBuild 30 #include "Parser/LinkageSpec.h" // for Spec 31 #include "SynTree/Expression.h" // for Expression, ConstantExpr (ptr only) 32 #include "SynTree/Label.h" // for Label 33 #include "SynTree/Statement.h" // for Statement, BranchStmt, BranchStmt:... 34 #include "SynTree/Type.h" // for Type, Type::FuncSpecifiers, Type::... 35 36 class Attribute; 37 class Declaration; 38 class DeclarationNode; 39 class DeclarationWithType; 40 class ExpressionNode; 41 class Initializer; 31 42 class StatementNode; 32 class CompoundStmtNode;33 class DeclarationNode;34 class ExpressionNode;35 class InitializerNode;36 class Attribute;37 43 38 44 //############################################################################## … … 371 377 Statement * build_expr( ExpressionNode * ctl ); 372 378 379 struct IfCtl { 380 IfCtl( DeclarationNode * decl, ExpressionNode * condition ) : 381 init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {} 382 383 StatementNode * init; 384 ExpressionNode * condition; 385 }; 386 373 387 struct ForCtl { 374 388 ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : … … 382 396 }; 383 397 384 Statement * build_if( ExpressionNode* ctl, StatementNode * then_stmt, StatementNode * else_stmt );398 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 385 399 Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt ); 386 400 Statement * build_case( ExpressionNode * ctl );
Note:
See TracChangeset
for help on using the changeset viewer.