Class ExpressionFact
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
NodeSyntaxNodeIdThe expression the fact describes.
LocationSourceLocationWhere the expression is written.
DeclaredTypeVBTypeThe declared type of the expression (RD-VBAL §5.0.1), or null when it is an error.
ClassificationExpressionClassificationWhat the expression names.
BindingSemanticId?The symbol the expression refers to, when it refers to one that resolved.
FlagsValueExpressionSemanticFlagsWhat else is the case of it.
ErrorVBCompileErrorInfoThe 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
Classification
What the expression names.
public ExpressionClassification Classification { get; init; }
Property Value
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
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
Flags
What else is the case of it.
public ValueExpressionSemanticFlags Flags { get; init; }
Property Value
Location
Where the expression is written.
public SourceLocation Location { get; init; }
Property Value
Node
The expression the fact describes.
public SyntaxNodeId Node { get; init; }