Table of Contents

Class DeclarationFact

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

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

Symbol SemanticId

The identity of the declared symbol.

Name string

The name it is declared with.

Kind DeclarationKind

What it declares.

Access AccessModifier

Who can refer to it besides the module's own code.

IsImplicit bool

Whether it was never declared: it came into being because something referred to it, which is legal and worth reporting.

Location SourceLocation

Where it is declared.

References DeclarationReferences?

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

AccessModifier

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

bool

Kind

What it declares.

public DeclarationKind Kind { get; init; }

Property Value

DeclarationKind

Location

Where it is declared.

public SourceLocation Location { get; init; }

Property Value

SourceLocation

Name

The name it is declared with.

public string Name { get; init; }

Property Value

string

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

DeclarationReferences?

Symbol

The identity of the declared symbol.

public SemanticId Symbol { get; init; }

Property Value

SemanticId