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>, 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
resolverISymbolResolverA read-only interface over the current execution context..
conversionContextConversionOperationSemanticContextbuilderISemanticFlagsAccumulator<TFlags>A semantic flags builder specifically for the operation defined by the
nodeunder scrutiny.nodeSyntaxNodeThe bound node to analyze.
inputsVBTypedValue[]The inputs of the bound node.
Returns
- ISemanticFlagsAccumulator<TFlags>
Returns its
builderparameter.
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
runtimeIVBExecutionContextThe execution context and memory space to operate with.
contextTContextThe semantic context of this operation, built by
Analyze.nodeSyntaxNodeThe 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.