public override void ExitGeneral_catch_clause(CSharp4Parser.General_catch_clauseContext context) { var slk = new StringBuilder(); slk.Append(context.CATCH().GetText()); slk.AppendLine(); var cBlock = context.block(); PrintBlockStatements(slk, cBlock); }
public override void ExitSpecific_catch_clause(CSharp4Parser.Specific_catch_clauseContext context) { var slk = new StringBuilder(); slk.Append(context.CATCH().GetText()); slk.Append(" "); slk.Append(context.OPEN_PARENS().GetText()); slk.Append(context.class_type().GetText()); if (context.identifier() != null) { slk.Append(" "); slk.Append(context.identifier().GetText()); } slk.Append(context.CLOSE_PARENS().GetText()); slk.AppendLine(); var cBlock = context.block(); PrintBlockStatements(slk, cBlock); Results.CatchBlocks.Add(slk.ToString()); }