Class SymbolDefinition
One source site where a BoundSymbol is declared. A symbol carries more than one only
when the same name is declared in several conditional-compilation branches
(#If VBA7 Then … #Else … #End If); collapsing the branches to a single symbol lets a
rename or refactor see and rewrite every site — live or dead — instead of blanking the inactive
branch and losing it.
public sealed record SymbolDefinition : IEquatable<SymbolDefinition>
- Inheritance
-
SymbolDefinition
- Implements
- Inherited Members
Constructors
SymbolDefinition(SourceRange, SourceRange, DefinitionState)
One source site where a BoundSymbol is declared. A symbol carries more than one only
when the same name is declared in several conditional-compilation branches
(#If VBA7 Then … #Else … #End If); collapsing the branches to a single symbol lets a
rename or refactor see and rewrite every site — live or dead — instead of blanking the inactive
branch and losing it.
public SymbolDefinition(SourceRange Range, SourceRange SelectionRange, DefinitionState State = DefinitionState.Unknown)
Parameters
RangeSourceRangeThe full source span of this declaration site.
SelectionRangeSourceRangeThe span to select when navigating to this site — typically the identifier token.
StateDefinitionStateWhether this site's conditional-compilation branch compiles. Unknown until a precompiler-evaluation pass resolves it.
Properties
Range
The full source span of this declaration site.
public SourceRange Range { get; init; }
Property Value
SelectionRange
The span to select when navigating to this site — typically the identifier token.
public SourceRange SelectionRange { get; init; }
Property Value
State
Whether this site's conditional-compilation branch compiles. Unknown until a precompiler-evaluation pass resolves it.
public DefinitionState State { get; init; }