Class OperatorSemanticContext<TFlags>
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
TFlagsThe specific type of semantic flags in this context.
- Inheritance
-
SemanticContext<TFlags>OperatorSemanticContext<TFlags>
- Implements
-
IEquatable<SemanticContext<TFlags>>IEquatable<OperatorSemanticContext<TFlags>>
- 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
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
ValidOperands
Gets the operands after they have undergone let-coercion and validation as applicable.
public VBTypedValue[] ValidOperands { get; init; }
Property Value
Remarks
Failed validation (or let-coercion) throws a type mismatch error at run-time.