Table of Contents

Interface IBlockVisitor<TInstruction, TState, TResult>

Namespace
Echo.ControlFlow.Blocks
Assembly
Echo.ControlFlow.dll

Provides members for visiting blocks in a scoped block tree.

public interface IBlockVisitor<TInstruction, in TState, out TResult> where TInstruction : notnull

Type Parameters

TInstruction

The type of instructions in the blocks.

TState

The type of state to pass onto the visitor.

TResult

The type of the result for every visited block.

Methods

VisitBasicBlock(BasicBlock<TInstruction>, TState)

Visits a basic block.

TResult VisitBasicBlock(BasicBlock<TInstruction> block, TState state)

Parameters

block BasicBlock<TInstruction>

The block.

state TState

The argument to pass along the visitor.

Returns

TResult

VisitExceptionHandlerBlock(ExceptionHandlerBlock<TInstruction>, TState)

Visits an exception handler block.

TResult VisitExceptionHandlerBlock(ExceptionHandlerBlock<TInstruction> block, TState state)

Parameters

block ExceptionHandlerBlock<TInstruction>

The block.

state TState

The argument to pass along the visitor.

Returns

TResult

VisitHandlerBlock(HandlerBlock<TInstruction>, TState)

Visits a handler block inside an ExceptionHandlerBlock<TInstruction>.

TResult VisitHandlerBlock(HandlerBlock<TInstruction> block, TState state)

Parameters

block HandlerBlock<TInstruction>

The block.

state TState

The argument to pass along the visitor.

Returns

TResult

VisitScopeBlock(ScopeBlock<TInstruction>, TState)

Visits a scope block.

TResult VisitScopeBlock(ScopeBlock<TInstruction> block, TState state)

Parameters

block ScopeBlock<TInstruction>

The block.

state TState

The argument to pass along the visitor.

Returns

TResult