Table of Contents

Class BlockWalker<TInstruction>

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

Provides a mechanism for traversing a scoped block tree in order.

public class BlockWalker<TInstruction> : IBlockVisitor<TInstruction> where TInstruction : notnull

Type Parameters

TInstruction
Inheritance
BlockWalker<TInstruction>
Implements
IBlockVisitor<TInstruction>
Inherited Members

Constructors

BlockWalker(IBlockListener<TInstruction>)

Creates a new block walker.

public BlockWalker(IBlockListener<TInstruction> listener)

Parameters

listener IBlockListener<TInstruction>

The object that responds to traversal events.

Methods

VisitBasicBlock(BasicBlock<TInstruction>)

Visits a basic block.

public void VisitBasicBlock(BasicBlock<TInstruction> block)

Parameters

block BasicBlock<TInstruction>

The block.

VisitExceptionHandlerBlock(ExceptionHandlerBlock<TInstruction>)

Visits an exception handler block.

public void VisitExceptionHandlerBlock(ExceptionHandlerBlock<TInstruction> block)

Parameters

block ExceptionHandlerBlock<TInstruction>

The block.

VisitHandlerBlock(HandlerBlock<TInstruction>)

Visits a handler block inside an ExceptionHandlerBlock<TInstruction>.

public void VisitHandlerBlock(HandlerBlock<TInstruction> block)

Parameters

block HandlerBlock<TInstruction>

The block.

VisitScopeBlock(ScopeBlock<TInstruction>)

Visits a scope block.

public void VisitScopeBlock(ScopeBlock<TInstruction> block)

Parameters

block ScopeBlock<TInstruction>

The block.

Walk(IBlock<TInstruction>)

Traverses a block tree and notifies the listener with traversal events.

public void Walk(IBlock<TInstruction> block)

Parameters

block IBlock<TInstruction>

The root of the block tree to traverse.