Table of Contents

Interface ILetCoercionRuntimeSemantics

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

Formalizes the interface of let-coercion runtime semantics.

public interface ILetCoercionRuntimeSemantics

Properties

LetCoercionSpecification

Type LetCoercionSpecification { get; }

Property Value

Type

Methods

Analyze(ILetCoercionSemanticContextBuilder, ISymbolResolver, ExpressionNode, LetCoercionStackFrame, LetCoercionResult)

Builds the semantic context of a let-coercion operation involving the semantics of a specific VBType.

LetCoercionAnalysisContext Analyze(ILetCoercionSemanticContextBuilder builder, ISymbolResolver resolver, ExpressionNode expression, LetCoercionStackFrame frame, LetCoercionResult result)

Parameters

builder ILetCoercionSemanticContextBuilder

Builds the semantic context of the conversion operation.

resolver ISymbolResolver

A symbol lookup service.

expression ExpressionNode

The expression whose evaluated value is being let-coerced (see EvaluateLetCoercion(ISymbolResolver, ExpressionNode, LetCoercionStackFrame)).

frame LetCoercionStackFrame

The current stack frame of the coercion operation.

result LetCoercionResult

The result of the let-coercion operation for the current stack frame.

Returns

LetCoercionAnalysisContext

An analysis context for this let-coercion operation.

Remarks

🧩 Analyzers (RDCore.Diagnostics and other plug-ins) perform the actual analysis of the semantic context.

EvaluateLetCoercion(ISymbolResolver, ExpressionNode, LetCoercionStackFrame)

Evaluates the let-coerced VBTypedValue for the specified effectiveType in the context of the specified expression.

LetCoercionResult EvaluateLetCoercion(ISymbolResolver resolver, ExpressionNode expression, LetCoercionStackFrame frame)

Parameters

resolver ISymbolResolver

A service that can resolve symbols and their values in the current context.

expression ExpressionNode

The expression whose evaluated value is being let-coerced. Usually a VBOperatorExpression (an operand of an operator that itself needs let-coercion semantics), but not always: a construct that forces a value to a specific type without an operator node of its own in source — a condition's truth test, for instance — coerces the same way and passes its own expression here.

frame LetCoercionStackFrame

The current stack frame of the coercion operation.

Returns

LetCoercionResult

An object that encapsulates the result of the operation, including any run-time errors to be thrown.