Table of Contents

Interface IRuntimeSemantics<TContext, TFlags>

Namespace
RDCore.SDK.Runtime.Abstract
Assembly
RDCore.SDK.dll

Represents any runtime semantics rules.

public interface IRuntimeSemantics<TContext, TFlags> where TContext : SemanticContext<TFlags>, new() where TFlags : struct, Enum

Type Parameters

TContext

The type of SemanticContext for this semantic operation.

TFlags

The type of semantic flags of the semantic context.

Methods

Analyze(IRuntimeSession, ConversionOperationSemanticContext, ISemanticFlagsAccumulator<TFlags>, SyntaxNode, params VBTypedValue[])

Analyzes the specified SyntaxNode in the specified execution context, using the specified inputs.

ISemanticFlagsAccumulator<TFlags> Analyze(IRuntimeSession session, ConversionOperationSemanticContext conversionContext, ISemanticFlagsAccumulator<TFlags> builder, SyntaxNode node, params VBTypedValue[] inputs)

Parameters

session IRuntimeSession

The current execution session — its Symbols.Resolver is the read face over the current execution context.

conversionContext ConversionOperationSemanticContext
builder ISemanticFlagsAccumulator<TFlags>

A semantic flags builder specifically for the operation defined by the node under scrutiny.

node SyntaxNode

The bound node to analyze.

inputs VBTypedValue[]

The inputs of the bound node.

Returns

ISemanticFlagsAccumulator<TFlags>

Returns its builder parameter.

Evaluate(IRuntimeSession, TContext, SyntaxNode, params VBTypedValue[])

Evaluates the specified SyntaxNode in the specified execution context, using the specified inputs.

RuntimeSemanticsEvaluationResult Evaluate(IRuntimeSession session, TContext context, SyntaxNode node, params VBTypedValue[] inputs)

Parameters

session IRuntimeSession

The current execution session — its Symbols.Resolver is the read face over the current execution context; Objects/CallStack are here for the runtime semantics that need to instantiate an object or push/pop an activation.

context TContext

The semantic context of this operation, built by Analyze.

node SyntaxNode

The bound node to be evaluated.

inputs VBTypedValue[]

The inputs of the bound node.

Returns

RuntimeSemanticsEvaluationResult

Remarks

⚠️ Does not throw any run-time errors; instead it packages the error metadata in the result.