protected virtual SqlStatement VisitLoop(LoopStatement statement)
{
if (statement is ForLoopStatement)
return VisitForLoop((ForLoopStatement) statement);
if (statement is WhileLoopStatement)
return VisitWhileLoop((WhileLoopStatement) statement);
if (statement is CursorForLoopStatement)
return VisitCursorForLoop((CursorForLoopStatement) statement);
var loop = new LoopStatement();
foreach (var child in statement.Statements) {
loop.Statements.Add(VisitStatement(child));
}
return loop;
}