Table of Contents

Class ExpressionFactCollector

Namespace
RDCore.SDK.Semantics
Assembly
RDCore.SDK.dll

An IExpressionFactSink that keeps what it is given, by the expression.

public sealed class ExpressionFactCollector : IExpressionFactSink
Inheritance
ExpressionFactCollector
Implements
Inherited Members

Methods

Record(ExpressionFact)

Records what is known of an expression. An expression that is evaluated again has its fact replaced.

public void Record(ExpressionFact fact)

Parameters

fact ExpressionFact

The fact.

ToImmutable()

The facts recorded so far, by expression.

public ImmutableDictionary<SyntaxNodeId, ExpressionFact> ToImmutable()

Returns

ImmutableDictionary<SyntaxNodeId, ExpressionFact>

TryGet(SyntaxNodeId, out ExpressionFact?)

Gets the fact of an expression the pass has evaluated, which it does for an operand before the expression that has it.

public bool TryGet(SyntaxNodeId node, out ExpressionFact? fact)

Parameters

node SyntaxNodeId

The expression.

fact ExpressionFact

Its fact.

Returns

bool