Table of Contents

Struct StaticSemanticsEvaluationResult

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

Represents the result of the evaluation of any static semantics.

public readonly record struct StaticSemanticsEvaluationResult : IEquatable<StaticSemanticsEvaluationResult>
Implements
Inherited Members

Constructors

StaticSemanticsEvaluationResult(VBType?, VBCompileErrorInfo?)

Represents the result of the evaluation of any static semantics.

public StaticSemanticsEvaluationResult(VBType? Result, VBCompileErrorInfo? ErrorInfo)

Parameters

Result VBType

The result of the static evaluation, if one was produced.

ErrorInfo VBCompileErrorInfo

The error metadata for the compile-time error to be reported, if applicable.

Properties

ErrorInfo

The error metadata for the compile-time error to be reported, if applicable.

public VBCompileErrorInfo? ErrorInfo { get; init; }

Property Value

VBCompileErrorInfo

IsError

true if the evaluation semantically yields a runtime error.

public bool IsError { get; }

Property Value

bool

Remarks

👉 This value represents a specified, consistent state where the program module is invalid due to a specific compilation error.

IsSuccess

true if the evaluation was successfully completed.

public bool IsSuccess { get; }

Property Value

bool

Remarks

✅ This value represents a normally completed, successful evaluation.

Result

The result of the static evaluation, if one was produced.

public VBType? Result { get; init; }

Property Value

VBType

Methods

Error(VBCompileErrorInfo)

Creates a new (failed) StaticSemanticsEvaluationResult with the specified VBCompileErrorInfo error information metadata.

public static StaticSemanticsEvaluationResult Error(VBCompileErrorInfo error)

Parameters

error VBCompileErrorInfo

The compile-time error metadata describing the evaluation failure.

Returns

StaticSemanticsEvaluationResult

Remarks

❌ Use this method only to signal a failed expression evaluation.

Success(VBType)

Creates a new (successful) StaticSemanticsEvaluationResult with the specified evaluation result.

public static StaticSemanticsEvaluationResult Success(VBType result)

Parameters

result VBType

The successfully evaluated static semantics evaluation result.

Returns

StaticSemanticsEvaluationResult

Remarks

✅ Use this method only to signal a successully evaluated expression result.