Changes in src/Parser/ParseNode.h [f271bdd:f2f512ba]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rf271bdd rf2f512ba 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 4 09:39:40 201813 // Update Count : 85 312 // Last Modified On : Fri Jul 20 14:56:30 2018 13 // Update Count : 850 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(); }135 134 template<typename T> 136 135 bool isExpressionType() const { return nullptr != dynamic_cast<T>(expr.get()); } … … 391 390 Statement * build_expr( ExpressionNode * ctl ); 392 391 393 struct IfCt rl {394 IfCt rl( DeclarationNode * decl, ExpressionNode * condition ) :392 struct IfCtl { 393 IfCtl( DeclarationNode * decl, ExpressionNode * condition ) : 395 394 init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {} 396 395 … … 399 398 }; 400 399 401 struct ForCt rl {402 ForCt rl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :400 struct ForCtl { 401 ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : 403 402 init( new StatementNode( build_expr( expr ) ) ), condition( condition ), change( change ) {} 404 ForCt rl( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) :403 ForCtl( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) : 405 404 init( new StatementNode( decl ) ), condition( condition ), change( change ) {} 406 405 … … 410 409 }; 411 410 412 Expression * build_if_control( IfCt rl * ctl, std::list< Statement * > & init );413 Statement * build_if( IfCt rl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );411 Expression * build_if_control( IfCtl * ctl, std::list< Statement * > & init ); 412 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 414 413 Statement * build_switch( bool isSwitch, ExpressionNode * ctl, StatementNode * stmt ); 415 414 Statement * build_case( ExpressionNode * ctl ); 416 415 Statement * build_default(); 417 Statement * build_while( IfCt rl * ctl, StatementNode * stmt );416 Statement * build_while( IfCtl * ctl, StatementNode * stmt ); 418 417 Statement * build_do_while( ExpressionNode * ctl, StatementNode * stmt ); 419 Statement * build_for( ForCt rl * forctl, StatementNode * stmt );418 Statement * build_for( ForCtl * forctl, StatementNode * stmt ); 420 419 Statement * build_branch( BranchStmt::Type kind ); 421 420 Statement * build_branch( std::string * identifier, BranchStmt::Type kind );
Note:
See TracChangeset
for help on using the changeset viewer.