Table of Contents

Class ExpressionFact

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

What the static pass found out about one expression.

public sealed record ExpressionFact : IEquatable<ExpressionFact>
Inheritance
ExpressionFact
Implements
Inherited Members

Remarks

A fact is a description of the expression, not an opinion of it: whether a late-bound member, a name written in the wrong case or a constant condition is worth a diagnostic is for an analyzer to say.

Constructors

ExpressionFact(SyntaxNodeId, SourceLocation, VBType?, ExpressionClassification, SemanticId?, ValueExpressionSemanticFlags, VBCompileErrorInfo?)

What the static pass found out about one expression.

public ExpressionFact(SyntaxNodeId Node, SourceLocation Location, VBType? DeclaredType, ExpressionClassification Classification, SemanticId? Binding, ValueExpressionSemanticFlags Flags, VBCompileErrorInfo? Error = null)

Parameters

Node SyntaxNodeId

The expression the fact describes.

Location SourceLocation

Where the expression is written.

DeclaredType VBType

The declared type of the expression (RD-VBAL §5.0.1), or null when it is an error.

Classification ExpressionClassification

What the expression names.

Binding SemanticId?

The symbol the expression refers to, when it refers to one that resolved.

Flags ValueExpressionSemanticFlags

What else is the case of it.

Error VBCompileErrorInfo

The compile error of the expression itself or of the first of its operands that has one, when it has.

Remarks

A fact is a description of the expression, not an opinion of it: whether a late-bound member, a name written in the wrong case or a constant condition is worth a diagnostic is for an analyzer to say.

Properties

Binding

The symbol the expression refers to, when it refers to one that resolved.

public SemanticId? Binding { get; init; }

Property Value

SemanticId?

Classification

What the expression names.

public ExpressionClassification Classification { get; init; }

Property Value

ExpressionClassification

DeclaredType

The declared type of the expression (RD-VBAL §5.0.1), or null when it is an error.

public VBType? DeclaredType { get; init; }

Property Value

VBType

Error

The compile error of the expression itself or of the first of its operands that has one, when it has.

public VBCompileErrorInfo? Error { get; init; }

Property Value

VBCompileErrorInfo

Flags

What else is the case of it.

public ValueExpressionSemanticFlags Flags { get; init; }

Property Value

ValueExpressionSemanticFlags

Location

Where the expression is written.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Node

The expression the fact describes.

public SyntaxNodeId Node { get; init; }

Property Value

SyntaxNodeId