Table of Contents

Class BoundArgument

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

The argument a call gives one parameter of the procedure it calls, bound (MS-VBAL §5.3.1.11): which of the arguments written at the call it is, and how it is passed - decided once, from the declarations and the arguments as they are written, rather than each time the call is made.

public sealed record BoundArgument : IEquatable<BoundArgument>
Inheritance
BoundArgument
Implements
Inherited Members

Remarks

What only the call can decide stays the call's: whether a variable given to a ByRef parameter is of its declared type (an element type, a field of an object only known at run time), what a Variant argument holds, an error the argument raises.

Constructors

BoundArgument(VBParameterSymbol, ArgumentPassing, ExpressionNode?, BoundNode?, ConversionPlan?, ImmutableArray<BoundNode>)

The argument a call gives one parameter of the procedure it calls, bound (MS-VBAL §5.3.1.11): which of the arguments written at the call it is, and how it is passed - decided once, from the declarations and the arguments as they are written, rather than each time the call is made.

public BoundArgument(VBParameterSymbol Parameter, ArgumentPassing Passing, ExpressionNode? Expression, BoundNode? Value, ConversionPlan? Plan, ImmutableArray<BoundNode> Elements)

Parameters

Parameter VBParameterSymbol

The parameter.

Passing ArgumentPassing

How the argument is passed.

Expression ExpressionNode

The argument as it is written - the value of a named argument; null for one that is Omitted or ParamArray.

Value BoundNode

The argument, bound; null when there is no Expression.

Plan ConversionPlan

How an argument passed by Value is let-coerced to the parameter's declared type, made for the argument's declared type - deferred when it is a Variant; null when the argument has no declared type, and for any other passing.

Elements ImmutableArray<BoundNode>

The arguments a ParamArray collects, bound; empty for any other passing.

Remarks

What only the call can decide stays the call's: whether a variable given to a ByRef parameter is of its declared type (an element type, a field of an object only known at run time), what a Variant argument holds, an error the argument raises.

Properties

Elements

The arguments a ParamArray collects, bound; empty for any other passing.

public ImmutableArray<BoundNode> Elements { get; init; }

Property Value

ImmutableArray<BoundNode>

Expression

The argument as it is written - the value of a named argument; null for one that is Omitted or ParamArray.

public ExpressionNode? Expression { get; init; }

Property Value

ExpressionNode

Parameter

The parameter.

public VBParameterSymbol Parameter { get; init; }

Property Value

VBParameterSymbol

Passing

How the argument is passed.

public ArgumentPassing Passing { get; init; }

Property Value

ArgumentPassing

Plan

How an argument passed by Value is let-coerced to the parameter's declared type, made for the argument's declared type - deferred when it is a Variant; null when the argument has no declared type, and for any other passing.

public ConversionPlan? Plan { get; init; }

Property Value

ConversionPlan

Value

The argument, bound; null when there is no Expression.

public BoundNode? Value { get; init; }

Property Value

BoundNode

Methods

IsByRef(VBParameterSymbol)

Whether the parameter is declared to be passed by reference: ByRef, said or not (MS-VBAL §5.3.1.5).

public static bool IsByRef(VBParameterSymbol parameter)

Parameters

parameter VBParameterSymbol

Returns

bool