Table of Contents

Class BoundVariable

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

A simple name that is a variable: a parameter, a local or Static variable, or a field (MS-VBAL §5.6.10), whose value is read.

public sealed record BoundVariable : BoundNode, IEquatable<BoundNode>, IEquatable<BoundVariable>
Inheritance
BoundVariable
Implements
Inherited Members

Remarks

What reading a name is - a call, a constant, an enumeration member's value, or a variable's value - depends on the symbol alone, and is decided once, here. A variable of the procedure the name is written in has its Slot in the procedure's FrameLayout.

Constructors

BoundVariable(SimpleNameExpressionNode, Symbol, FrameSlot?, bool)

A simple name that is a variable: a parameter, a local or Static variable, or a field (MS-VBAL §5.6.10), whose value is read.

public BoundVariable(SimpleNameExpressionNode Name, Symbol Variable, FrameSlot? Slot, bool IsAutoInstantiated)

Parameters

Name SimpleNameExpressionNode

The simple name expression.

Variable Symbol

The variable the name resolves to.

Slot FrameSlot?

The slot of the variable, when it is a parameter or a variable of the procedure the name is written in, and is not Static.

IsAutoInstantiated bool

Whether the variable is declared As New (MS-VBAL §5.2.3.1.4): a reference to it creates the object it does not hold yet.

Remarks

What reading a name is - a call, a constant, an enumeration member's value, or a variable's value - depends on the symbol alone, and is decided once, here. A variable of the procedure the name is written in has its Slot in the procedure's FrameLayout.

Properties

IsAutoInstantiated

Whether the variable is declared As New (MS-VBAL §5.2.3.1.4): a reference to it creates the object it does not hold yet.

public bool IsAutoInstantiated { get; init; }

Property Value

bool

Name

The simple name expression.

public SimpleNameExpressionNode Name { get; init; }

Property Value

SimpleNameExpressionNode

Slot

The slot of the variable, when it is a parameter or a variable of the procedure the name is written in, and is not Static.

public FrameSlot? Slot { get; init; }

Property Value

FrameSlot?

Variable

The variable the name resolves to.

public Symbol Variable { get; init; }

Property Value

Symbol