Table of Contents

Class IndexExpressionNode

Namespace
RDCore.SDK.Model.AST.Expressions
Assembly
RDCore.SDK.dll

MS-VBAL 5.6.13 index-expression (callee(arguments)): represents both a procedure/function call and array/collection indexing; which one it is is a semantic question the resolver answers from the callee's declared kind, not something this node encodes.

public sealed record IndexExpressionNode : ExpressionNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<ExpressionNode>, IEquatable<IndexExpressionNode>
Inheritance
IndexExpressionNode
Implements
Inherited Members
Extension Methods

Constructors

IndexExpressionNode(SyntaxNodeId, SourceLocation, ExpressionNode, ImmutableArray<ExpressionNode>)

MS-VBAL 5.6.13 index-expression (callee(arguments)): represents both a procedure/function call and array/collection indexing; which one it is is a semantic question the resolver answers from the callee's declared kind, not something this node encodes.

public IndexExpressionNode(SyntaxNodeId Identity, SourceLocation Location, ExpressionNode Callee, ImmutableArray<ExpressionNode> Arguments)

Parameters

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

Location SourceLocation

The Location (holds the document Uri and a Range) of the bound expression.

Callee ExpressionNode

The expression being called or indexed.

Arguments ImmutableArray<ExpressionNode>

The argument list, in source order. Each element is a bare expression for a positional argument, or a NamedArgumentNode, MissingArgumentNode, or AddressOfExpressionNode for the other MS-VBAL 5.6.13.1 argument forms.

Properties

Arguments

The argument list, in source order. Each element is a bare expression for a positional argument, or a NamedArgumentNode, MissingArgumentNode, or AddressOfExpressionNode for the other MS-VBAL 5.6.13.1 argument forms.

public ImmutableArray<ExpressionNode> Arguments { get; init; }

Property Value

ImmutableArray<ExpressionNode>

Callee

The expression being called or indexed.

public ExpressionNode Callee { get; init; }

Property Value

ExpressionNode

Methods

IsEmptyArgumentList(ImmutableArray<ExpressionNode>)

Whether arguments is an empty argument list (MS-VBAL 5.6.13.1): no argument at all, or the parentheses of F(), which the parser reads as one MissingArgumentNode.

public static bool IsEmptyArgumentList(ImmutableArray<ExpressionNode> arguments)

Parameters

arguments ImmutableArray<ExpressionNode>

The arguments of an index expression, or of a call statement.

Returns

bool

true when nothing is passed: F, F(); false for F(1) or F(, 2).