public virtual void VisitTryCatchStatement(TryCatchStatement tryCatchStatement)
{
StartNode(tryCatchStatement);
WriteKeyword(TryCatchStatement.TryKeywordRole);
WriteBlock(tryCatchStatement.TryBlock, policy.StatementBraceStyle);
foreach (var catchClause in tryCatchStatement.CatchClauses) {
if (policy.CatchNewLinePlacement == NewLinePlacement.SameLine)
Space();
else
NewLine();
catchClause.AcceptVisitor(this);
}
if (!tryCatchStatement.FinallyBlock.IsNull) {
if (policy.FinallyNewLinePlacement == NewLinePlacement.SameLine)
Space();
else
NewLine();
WriteKeyword(TryCatchStatement.FinallyKeywordRole);
WriteBlock(tryCatchStatement.FinallyBlock, policy.StatementBraceStyle);
}
NewLine();
EndNode(tryCatchStatement);
}