Changes in src/Parser/ParseNode.h [f2f512ba:f271bdd]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rf2f512ba rf271bdd 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.