Class ScopedExpressionSlimVisitorBase
Base class for expression visitors with scope tracking facilities.
Inheritance
Inherited Members
Namespace: System.Linq.CompilerServices.Bonsai
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public abstract class ScopedExpressionSlimVisitorBase : ExpressionSlimVisitor
Constructors
ScopedExpressionSlimVisitorBase()
Declaration
protected ScopedExpressionSlimVisitorBase()
Methods
Pop()
Pops a scope.
Declaration
protected abstract void Pop()
Push(IEnumerable<ParameterExpressionSlim>)
Pushes the parameters of a new declaration site into a new scope.
Declaration
protected abstract void Push(IEnumerable<ParameterExpressionSlim> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ParameterExpressionSlim> | parameters | Parameters of the declaration site. |
VisitBlock(BlockExpressionSlim)
Visits a block expression, applying scope tracking to the block's declared variables. To visit blocks in derived classes, use VisitBlockCore(BlockExpressionSlim).
Declaration
protected override sealed ExpressionSlim VisitBlock(BlockExpressionSlim node)
Parameters
Type | Name | Description |
---|---|---|
BlockExpressionSlim | node | Block expression to visit. |
Returns
Type | Description |
---|---|
ExpressionSlim | Result of visiting the block expression. |
Overrides
VisitBlockCore(BlockExpressionSlim)
Visits a block expression. During the call, the block's variables are mapped in the tracked scope symbol table.
Declaration
protected virtual ExpressionSlim VisitBlockCore(BlockExpressionSlim node)
Parameters
Type | Name | Description |
---|---|---|
BlockExpressionSlim | node | Block expression to visit. |
Returns
Type | Description |
---|---|
ExpressionSlim | Result of visiting the block expression. |
VisitCatchBlock(CatchBlockSlim)
Visits a catch block, applying scope tracking to the block's declared variable (if any). To visit catch blocks in derived classes, use VisitCatchBlockCore(CatchBlockSlim).
Declaration
protected override sealed CatchBlockSlim VisitCatchBlock(CatchBlockSlim node)
Parameters
Type | Name | Description |
---|---|---|
CatchBlockSlim | node | Catch block to visit. |
Returns
Type | Description |
---|---|
CatchBlockSlim | Result of visiting the catch block. |
Overrides
VisitCatchBlockCore(CatchBlockSlim)
Visits a catch block. During the call, the block's variables are mapped in the tracked scope symbol table.
Declaration
protected virtual CatchBlockSlim VisitCatchBlockCore(CatchBlockSlim node)
Parameters
Type | Name | Description |
---|---|---|
CatchBlockSlim | node | Catch block to visit. |
Returns
Type | Description |
---|---|
CatchBlockSlim | Result of visiting the catch block. |
VisitLambda(LambdaExpressionSlim)
Visits a lambda expression, applying scope tracking to the lambda's declared parameters. To visit lambda expressions in derived classes, use VisitLambdaCore(LambdaExpressionSlim).
Declaration
protected override sealed ExpressionSlim VisitLambda(LambdaExpressionSlim node)
Parameters
Type | Name | Description |
---|---|---|
LambdaExpressionSlim | node | Lambda expression to visit. |
Returns
Type | Description |
---|---|
ExpressionSlim | Result of visiting the lambda expression. |
Overrides
VisitLambdaCore(LambdaExpressionSlim)
Visits a lambda expression. During the call, the block's variables are mapped in the tracked scope symbol table.
Declaration
protected virtual ExpressionSlim VisitLambdaCore(LambdaExpressionSlim node)
Parameters
Type | Name | Description |
---|---|---|
LambdaExpressionSlim | node | Lambda expression to visit. |
Returns
Type | Description |
---|---|
ExpressionSlim | Result of visiting the lambda expression. |