* @param block statement body block
*/
private void addForStatement(String name, Type type, Expression init, Expression test, Expression post,
BlockBuilder block) {
ForStatement stmt = m_ast.newForStatement();
VariableDeclarationFragment declfrag = m_ast.newVariableDeclarationFragment();
declfrag.setName(m_ast.newSimpleName(name));
declfrag.setInitializer(init);
VariableDeclarationExpression varexpr = m_ast.newVariableDeclarationExpression(declfrag);
varexpr.setType(type);
stmt.initializers().add(varexpr);
stmt.setExpression(test);
if (post != null) {