Table of Contents

Class ExpressionBindings

Namespace
RDCore.SDK.Semantics.Binding
Assembly
RDCore.SDK.dll

What the expressions of a tree bind to, recorded as the static semantics evaluate them: an operand before the expression that has it.

public sealed class ExpressionBindings
Inheritance
ExpressionBindings
Inherited Members

Remarks

The bindings are those of the expressions the static semantics evaluate: an expression after an operand that is a compile error is not evaluated, and is not bound. Like the evaluation it records, a recorder is for one binding at a time: it is not thread-safe.

Properties

Bound

What each expression bound to, by its Identity.

public IReadOnlyDictionary<SyntaxNodeId, BoundExpression> Bound { get; }

Property Value

IReadOnlyDictionary<SyntaxNodeId, BoundExpression>

Frame

The layout of the activations of the procedure the expressions are written in, which binds its parameters and variables to their slots; null when the expressions are bound outside a procedure, and no variable is bound to a slot.

public FrameLayout? Frame { get; init; }

Property Value

FrameLayout

this[SyntaxNodeId]

What the expression with this Identity bound to, if it was bound.

public BoundExpression? this[SyntaxNodeId node] { get; }

Parameters

node SyntaxNodeId

Property Value

BoundExpression

Methods

NodeOf(ExpressionNode)

The bound tree of an expression that was bound (BoundNode); null for one that was not.

public BoundNode? NodeOf(ExpressionNode expression)

Parameters

expression ExpressionNode

The expression.

Returns

BoundNode