src/Parser/StatementNode.cc
StatementNode * maybe_build_compound( StatementNode * first ) {
	// Optimization: if the control-structure statement is a compound statement, do not wrap it.
	// e.g., if (...) {...} do not wrap the existing compound statement.
	if ( ! dynamic_cast<CompoundStmt *>( first->stmt.get() ) ) { // unique_ptr
		CompoundStmt * cs = new CompoundStmt();
		buildMoveList( first, cs->get_kids() );
		return new StatementNode( cs );
	} // if
	return first;
}
// A single statement in a control structure is always converted to a compound statement so subsequent generated code
// can be placed within this compound statement. Otherwise, code generation has to constantly check for a single
// statement and wrap it into a compound statement to insert additional code. Hence, all control structures have a
// conical form for code generation.
A single statement in a control structure is always converted to a compound statement so subsequent generated code
can be placed within this compound statement. Otherwise, code generation has to constantly check for a single
statement and wrap it into a compound statement to insert additional code. Hence, all control structures have a
conical form for code generation.
A single statement in a control structure is always converted to a compound statement so subsequent generated code can be placed within this compound statement . Otherwise code generation has to constantly check for a single statement and wrap it into a compound statement to insert additional code . Hence all control structures have a conical form for code generation .
StatementNode * maybe_build_compound( StatementNode * first ) {
	if ( ! dynamic_cast<CompoundStmt *>( first->stmt.get() ) ) { 
		CompoundStmt * cs = new CompoundStmt();
		buildMoveList( first, cs->get_kids() );
		return new StatementNode( cs );
	} 
	return first;
}
StatementNode * maybe_build_compound ( StatementNode * first ) { if ( ! dynamic_cast < CompoundStmt * > ( first -> stmt . get ( ) ) ) { CompoundStmt * cs = new CompoundStmt ( ) ; buildMoveList ( first , cs -> get_kids ( ) ) ; return new StatementNode ( cs ) ; } return first ; }
A single statement in a control structure is always converted to a compound statement so subsequent generated code
can be placed within this compound statement.
A single statement in a control structure is always converted to a compound statement so subsequent generated code can be placed within this compound statement .
// Optimization: if the control-structure statement is a compound statement, do not wrap it. // e.g., if (...) {...} do not wrap the existing compound statement. // unique_ptr // if