public AstNode addStatement(AstNode blockOrStatement, AstNode statement) {
if (blockOrStatement instanceof Block) {
((Block) blockOrStatement).addStatement(statement);
return blockOrStatement;
}
Block block = new Block();
if (blockOrStatement != null) {
block.addStatement(blockOrStatement);
}
if (statement != null) {
block.addStatement(statement);
}
return block;
}