Table of Contents

Class OperatorSemanticContext<TFlags>

Namespace
RDCore.SDK.Semantics.Context.Abstract
Assembly
RDCore.SDK.dll

Represents the semantic context of an operator expression.

public abstract record OperatorSemanticContext<TFlags> : SemanticContext<TFlags>, IEquatable<SemanticContext<TFlags>>, IEquatable<OperatorSemanticContext<TFlags>> where TFlags : struct, Enum

Type Parameters

TFlags

The specific type of semantic flags in this context.

Inheritance
OperatorSemanticContext<TFlags>
Implements
Derived
Inherited Members

Properties

EffectiveType

Gets the effective type of the operation, as determined by the data type of the operand(s).

public VBType? EffectiveType { get; init; }

Property Value

VBType

Remarks

👉 Represents the outcome of the first step of the operator expression evaluation process. A type mismatch error is thrown at run-time is no effective type can be determined.

OperationResult

Gets the evaluated operation result if it can be evaluated in a semantic analysis context.

public VBTypedValue? OperationResult { get; init; }

Property Value

VBTypedValue

ValidOperands

Gets the operands after they have undergone let-coercion and validation as applicable.

public VBTypedValue[] ValidOperands { get; init; }

Property Value

VBTypedValue[]

Remarks

Failed validation (or let-coercion) throws a type mismatch error at run-time.