Interface IRuntimeSemantics<TContext, TFlags>
Represents any runtime semantics rules.
public interface IRuntimeSemantics<TContext, TFlags> where TContext : SemanticContext<TFlags>, new() where TFlags : struct, Enum
Type Parameters
TContextThe type of
SemanticContextfor this semantic operation.TFlagsThe type of semantic flags of the semantic context.
Methods
Analyze(ISymbolResolver, ConversionOperationSemanticContext, ISemanticFlagsAccumulator<TFlags>, BoundNode, 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, BoundNode node, params VBTypedValue[] inputs)
Parameters
resolverISymbolResolverA read-only interface over the current execution context..
conversionContextConversionOperationSemanticContextbuilderISemanticFlagsAccumulator<TFlags>A semantic flags builder specifically for the operation defined by the
nodeunder scrutiny.nodeBoundNodeThe bound node to analyze.
inputsVBTypedValue[]The inputs of the bound node.
Returns
- ISemanticFlagsAccumulator<TFlags>
Returns its
builderparameter.
Evaluate(IVBExecutionContext, SemanticContext<TFlags>, BoundNode, params VBTypedValue[])
Evaluates the specified BoundNode in the specified execution context, using the specified inputs.
RuntimeSemanticsEvaluationResult Evaluate(IVBExecutionContext runtime, SemanticContext<TFlags> context, BoundNode node, params VBTypedValue[] inputs)
Parameters
runtimeIVBExecutionContextThe execution context and memory space to operate with.
contextSemanticContext<TFlags>The semantic context of this operation, built by
Analyze.nodeBoundNodeThe bound node to be evaluated.
inputsVBTypedValue[]The inputs of the bound node.
Returns
Remarks
⚠️ Does not throw any run-time errors; instead it packages the error metadata in the result.