Table of Contents

Class IndexExpressionStaticSemantics

Namespace
RDCore.SDK.Semantics.Static.Expressions
Assembly
RDCore.SDK.dll

MS-VBAL 5.6.13 Index Expressions (static semantics). callee(arguments) is either an array element access, a call to a specific class's default member, or a call to whatever Callee itself already resolves to (a function or property-get reference, whose declared type already is its return type — see SimpleNameExpressionStaticSemantics and MemberAccessExpressionStaticSemantics).

public sealed record IndexExpressionStaticSemantics : IStaticSemantics, IEquatable<IndexExpressionStaticSemantics>
Inheritance
IndexExpressionStaticSemantics
Implements
Inherited Members

Properties

Instance

The shared instance — this rule has no state of its own.

public static IndexExpressionStaticSemantics Instance { get; }

Property Value

IndexExpressionStaticSemantics

Methods

DetermineDeclaredType(StaticEvaluationContext, ExpressionNode, params VBType[])

Determines the declared type of an IndexExpressionNode from its Callee's already-determined declared type.

public StaticSemanticsEvaluationResult DetermineDeclaredType(StaticEvaluationContext context, ExpressionNode expression, params VBType[] operandDeclaredTypes)

Parameters

context StaticEvaluationContext

The compile-time context this expression is evaluated against. Unused — resolution here is structural (the callee's declared type), not lexical.

expression ExpressionNode

The IndexExpressionNode being evaluated.

operandDeclaredTypes VBType[]

Callee's already-determined declared type, at IndexExpressionCallee. Arguments carry no independent declared type this rule needs — MS-VBAL 5.6.13's argument-count/rank and parameter-list compatibility checks are not modeled: VBArrayType doesn't carry a rank, and no parameter-list representation exists for a resolved function/property-get type.

Returns

StaticSemanticsEvaluationResult

Exceptions

ArgumentException

expression is not an IndexExpressionNode.