Example #1
0
        /// <inheritdoc />
        public void EnterHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex)
        {
            AppendIndentationString();
            _builder.AppendLine($"handler{handlerIndex}:");

            OpenScope();
        }
Example #2
0
        /// <inheritdoc />
        public void ExitExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block)
        {
            _indentationLevel--;

            AppendIndentationString();
            _builder.Append('}');
            _builder.AppendLine();
        }
Example #3
0
        /// <inheritdoc />
        public void EnterExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block)
        {
            AppendIndentationString();
            _builder.Append('{');
            _builder.AppendLine();

            _indentationLevel++;
        }
Example #4
0
        /// <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);
        }
Example #5
0
 /// <inheritdoc />
 public void ExitHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex)
 {
 }
Example #6
0
 /// <inheritdoc />
 public void ExitProtectedBlock(ExceptionHandlerBlock <TInstruction> block)
 {
 }
Example #7
0
 /// <inheritdoc />
 public void EnterProtectedBlock(ExceptionHandlerBlock <TInstruction> block)
 {
     AppendIndentationString();
     _builder.AppendLine("try:");
 }
Example #8
0
 /// <inheritdoc />
 public void ExitExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) => CloseScope();
Example #9
0
 /// <inheritdoc />
 public void EnterExceptionHandlerBlock(ExceptionHandlerBlock <TInstruction> block) => OpenScope();
Example #10
0
 /// <inheritdoc />
 public void ExitHandlerBlock(ExceptionHandlerBlock <TInstruction> block, int handlerIndex) => CloseScope();