/// <inheritdoc /> public void EnterHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex) { AppendIndentationString(); _builder.AppendLine($"handler{handlerIndex}:"); OpenScope(); }
/// <inheritdoc /> public void ExitExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) { _indentationLevel--; AppendIndentationString(); _builder.Append('}'); _builder.AppendLine(); }
/// <inheritdoc /> public void EnterExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) { AppendIndentationString(); _builder.Append('{'); _builder.AppendLine(); _indentationLevel++; }
/// <inheritdoc /> public void VisitExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) { _listener.EnterExceptionHandlerBlock(block); _listener.EnterProtectedBlock(block); block.ProtectedBlock.AcceptVisitor(this); _listener.ExitProtectedBlock(block); for (int i = 0; i < block.HandlerBlocks.Count; i++) { var handlerBlock = block.HandlerBlocks[i]; _listener.EnterHandlerBlock(block, i); handlerBlock.AcceptVisitor(this); _listener.ExitHandlerBlock(block, i); } _listener.ExitExceptionHandlerBlock(block); }
/// <inheritdoc /> public void ExitHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex) { }
/// <inheritdoc /> public void ExitProtectedBlock(ExceptionHandlerBlock <TInstruction> block) { }
/// <inheritdoc /> public void EnterProtectedBlock(ExceptionHandlerBlock <TInstruction> block) { AppendIndentationString(); _builder.AppendLine("try:"); }
/// <inheritdoc /> public void ExitExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) => CloseScope();
/// <inheritdoc /> public void EnterExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) => OpenScope();
/// <inheritdoc /> public void ExitHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex) => CloseScope();