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(ISymbolResolver, ConversionOperationSemanticContext, ISemanticFlagsAccumulator<TFlags>, SyntaxNode, params VBTypedValue[])

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

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

Parameters

resolver ISymbolResolver

A read-only interface 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(IVBExecutionContext, TContext, SyntaxNode, params VBTypedValue[])

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

RuntimeSemanticsEvaluationResult Evaluate(IVBExecutionContext runtime, TContext context, SyntaxNode node, params VBTypedValue[] inputs)

Parameters

runtime IVBExecutionContext

The execution context and memory space to operate with.

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.