Class DeclarationFact
What the static pass found out about a declaration.
public sealed record DeclarationFact : IEquatable<DeclarationFact>
- Inheritance
-
DeclarationFact
- Implements
- Inherited Members
Remarks
A fact is stated only when it is true. What refers to a declaration that is accessible from outside the module, or that is called by convention or through the object it is a member of rather than by an expression that names it (an event handler, a member that implements an interface), is not all in the code the pass analyzed, and its references are not counted: References is then null, which says the references are not known and not that there are none.
Constructors
DeclarationFact(SemanticId, string, DeclarationKind, AccessModifier, bool, SourceLocation, DeclarationReferences?)
What the static pass found out about a declaration.
public DeclarationFact(SemanticId Symbol, string Name, DeclarationKind Kind, AccessModifier Access, bool IsImplicit, SourceLocation Location, DeclarationReferences? References)
Parameters
SymbolSemanticIdThe identity of the declared symbol.
NamestringThe name it is declared with.
KindDeclarationKindWhat it declares.
AccessAccessModifierWho can refer to it besides the module's own code.
IsImplicitboolWhether it was never declared: it came into being because something referred to it, which is legal and worth reporting.
LocationSourceLocationWhere it is declared.
ReferencesDeclarationReferences?Every reference to it, when every reference to it is in the code that was analyzed and was analyzed completely; null otherwise.
Remarks
A fact is stated only when it is true. What refers to a declaration that is accessible from outside the module, or that is called by convention or through the object it is a member of rather than by an expression that names it (an event handler, a member that implements an interface), is not all in the code the pass analyzed, and its references are not counted: References is then null, which says the references are not known and not that there are none.
Properties
Access
Who can refer to it besides the module's own code.
public AccessModifier Access { get; init; }
Property Value
DeclaredBy
How a local variable came to be declared: a Dim or a Static statement, a ReDim statement whose name matched nothing
(MS-VBAL §5.4.3.3), or a reference to a name that matched nothing (§5.6.10). null for any other declaration.
public LocalDeclarationKind? DeclaredBy { get; init; }
Property Value
Hides
What a local or a parameter hides: what its name means in the rest of the module, which in its procedure it does not (MS-VBAL §5.6.10, a name is first matched in the procedure). null when the name means nothing else there, and for any other declaration.
public HiddenDeclaration? Hides { get; init; }
Property Value
IsImplicit
Whether it was never declared: it came into being because something referred to it, which is legal and worth reporting.
public bool IsImplicit { get; init; }
Property Value
Kind
What it declares.
public DeclarationKind Kind { get; init; }
Property Value
Location
Where it is declared.
public SourceLocation Location { get; init; }
Property Value
Name
The name it is declared with.
public string Name { get; init; }
Property Value
References
Every reference to it, when every reference to it is in the code that was analyzed and was analyzed completely; null otherwise.
public DeclarationReferences? References { get; init; }
Property Value
Role
What the declaration is there for, when it implements a member of an interface or handles an event. A role is stated only for a member of a class module whose interfaces and event sources the pass resolved; None is not a statement that it has none otherwise.
public DeclarationRole Role { get; init; }
Property Value
Symbol
The identity of the declared symbol.
public SemanticId Symbol { get; init; }