Changeset 9aa9126 for src/Parser/ParseNode.h
- Timestamp:
- Aug 9, 2018, 1:14:24 PM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- fc846ae
- Parents:
- 7a7ab42 (diff), 3b2b37f (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
r7a7ab42 r9aa9126 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 14:56:30 201813 // Update Count : 85 012 // Last Modified On : Sat Aug 4 09:39:40 2018 13 // Update Count : 853 14 14 // 15 15 … … 132 132 void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {} 133 133 134 Expression *get_expr() const { return expr.get(); } 134 135 template<typename T> 135 136 bool isExpressionType() const { return nullptr != dynamic_cast<T>(expr.get()); } … … 390 391 Statement * build_expr( ExpressionNode * ctl ); 391 392 392 struct IfCt l {393 IfCt l( DeclarationNode * decl, ExpressionNode * condition ) :393 struct IfCtrl { 394 IfCtrl( DeclarationNode * decl, ExpressionNode * condition ) : 394 395 init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {} 395 396 … … 398 399 }; 399 400 400 struct ForCt l {401 ForCt l( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :401 struct ForCtrl { 402 ForCtrl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : 402 403 init( new StatementNode( build_expr( expr ) ) ), condition( condition ), change( change ) {} 403 ForCt l( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) :404 ForCtrl( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) : 404 405 init( new StatementNode( decl ) ), condition( condition ), change( change ) {} 405 406 … … 409 410 }; 410 411 411 Expression * build_if_control( IfCt l * ctl, std::list< Statement * > & init );412 Statement * build_if( IfCt l * ctl, StatementNode * then_stmt, StatementNode * else_stmt );412 Expression * build_if_control( IfCtrl * ctl, std::list< Statement * > & init ); 413 Statement * build_if( IfCtrl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 413 414 Statement * build_switch( bool isSwitch, ExpressionNode * ctl, StatementNode * stmt ); 414 415 Statement * build_case( ExpressionNode * ctl ); 415 416 Statement * build_default(); 416 Statement * build_while( IfCt l * ctl, StatementNode * stmt );417 Statement * build_while( IfCtrl * ctl, StatementNode * stmt ); 417 418 Statement * build_do_while( ExpressionNode * ctl, StatementNode * stmt ); 418 Statement * build_for( ForCt l * forctl, StatementNode * stmt );419 Statement * build_for( ForCtrl * forctl, StatementNode * stmt ); 419 420 Statement * build_branch( BranchStmt::Type kind ); 420 421 Statement * build_branch( std::string * identifier, BranchStmt::Type kind );
Note: See TracChangeset
for help on using the changeset viewer.