Show / Hide Table of Contents

Class ScopedExpressionVisitorBase

Base class for expression visitors with scope tracking facilities.

Inheritance
System.Object
ScopedExpressionVisitorBase
ScopedExpressionVisitor<TState>
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public abstract class ScopedExpressionVisitorBase : ExpressionVisitor

Constructors

ScopedExpressionVisitorBase()

Declaration
protected ScopedExpressionVisitorBase()

Methods

Pop()

Pops a scope.

Declaration
protected abstract void Pop()

Push(IEnumerable<ParameterExpression>)

Pushes the parameters of a new declaration site into a new scope.

Declaration
protected abstract void Push(IEnumerable<ParameterExpression> parameters)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Linq.Expressions.ParameterExpression> parameters

Parameters of the declaration site.

VisitBlock(BlockExpression)

Visits a block expression, applying scope tracking to the block's declared variables. To visit blocks in derived classes, use VisitBlockCore(BlockExpression).

Declaration
protected override sealed Expression VisitBlock(BlockExpression node)
Parameters
Type Name Description
System.Linq.Expressions.BlockExpression node

Block expression to visit.

Returns
Type Description
System.Linq.Expressions.Expression

Result of visiting the block expression.

VisitBlockCore(BlockExpression)

Visits a block expression. During the call, the block's variables are mapped in the tracked scope symbol table.

Declaration
protected virtual Expression VisitBlockCore(BlockExpression node)
Parameters
Type Name Description
System.Linq.Expressions.BlockExpression node

Block expression to visit.

Returns
Type Description
System.Linq.Expressions.Expression

Result of visiting the block expression.

VisitCatchBlock(CatchBlock)

Visits a catch block, applying scope tracking to the block's declared variable (if any). To visit catch blocks in derived classes, use VisitCatchBlockCore(CatchBlock).

Declaration
protected override sealed CatchBlock VisitCatchBlock(CatchBlock node)
Parameters
Type Name Description
System.Linq.Expressions.CatchBlock node

Catch block to visit.

Returns
Type Description
System.Linq.Expressions.CatchBlock

Result of visiting the catch block.

VisitCatchBlockCore(CatchBlock)

Visits a catch block. During the call, the block's variables are mapped in the tracked scope symbol table.

Declaration
protected virtual CatchBlock VisitCatchBlockCore(CatchBlock node)
Parameters
Type Name Description
System.Linq.Expressions.CatchBlock node

Catch block to visit.

Returns
Type Description
System.Linq.Expressions.CatchBlock

Result of visiting the catch block.

VisitLambda<T>(Expression<T>)

Visits a lambda expression, applying scope tracking to the lambda's declared parameters. To visit lambda expressions in derived classes, use VisitLambdaCore<T>(Expression<T>).

Declaration
protected override sealed Expression VisitLambda<T>(Expression<T> node)
Parameters
Type Name Description
System.Linq.Expressions.Expression<T> node

Lambda expression to visit.

Returns
Type Description
System.Linq.Expressions.Expression

Result of visiting the lambda expression.

Type Parameters
Name Description
T

Type of the delegate.

VisitLambdaCore<T>(Expression<T>)

Visits a lambda expression. During the call, the block's variables are mapped in the tracked scope symbol table.

Declaration
protected virtual Expression VisitLambdaCore<T>(Expression<T> node)
Parameters
Type Name Description
System.Linq.Expressions.Expression<T> node

Lambda expression to visit.

Returns
Type Description
System.Linq.Expressions.Expression

Result of visiting the lambda expression.

Type Parameters
Name Description
T

Type of the delegate.

In This Article
Back to top Generated by DocFX