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
TInstructionThe type of instructions in the blocks.
TStateThe type of state to pass onto the visitor.
TResultThe 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
blockBasicBlock<TInstruction>The block.
stateTStateThe 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
blockExceptionHandlerBlock<TInstruction>The block.
stateTStateThe 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
blockHandlerBlock<TInstruction>The block.
stateTStateThe argument to pass along the visitor.
Returns
- TResult
VisitScopeBlock(ScopeBlock<TInstruction>, TState)
Visits a scope block.
TResult VisitScopeBlock(ScopeBlock<TInstruction> block, TState state)
Parameters
blockScopeBlock<TInstruction>The block.
stateTStateThe argument to pass along the visitor.
Returns
- TResult