Class VBLocalVariableSymbol
A TypedSymbol representing any local variable.
public record VBLocalVariableSymbol : BoundTypedSymbol, IEquatable<Symbol>, IEquatable<BoundSymbol>, ITypedSymbol, IEquatable<BoundTypedSymbol>, IEquatable<VBLocalVariableSymbol>
- Inheritance
-
VBLocalVariableSymbol
- Implements
- Derived
- Inherited Members
Constructors
VBLocalVariableSymbol(Uri, Uri, string, ScopeKind, SourceRange, SourceRange, bool, VBType?, LocalDeclarationKind)
A TypedSymbol representing any local variable.
public VBLocalVariableSymbol(Uri WorkspaceRoot, Uri ParentUri, string Name, ScopeKind Scope, SourceRange Range, SourceRange SelectionRange, bool IsStatic = false, VBType? ResolvedType = null, LocalDeclarationKind DeclaredBy = LocalDeclarationKind.Dim)
Parameters
WorkspaceRootUriThe workspace root for this symbol. For an external project or library, this should be different than the user's project workspace.
ParentUriUriThe
Uriof the parent symbol.NamestringThe identifier name of the symbol.
ScopeScopeKindThe allocation scope of the symbol.
RangeSourceRangeA
Rangepointing to the document location that belongs to this symbol.SelectionRangeSourceRangeA
Rangepointing to the document location that should be selected when navigating to this symbol.IsStaticbooltrueif the symbol declaration includes an explicitStatictoken.ResolvedTypeVBTypeThe resolved
VBTypeof the symbol, if available.VBUnknownTypeunless specified otherwise.DeclaredByLocalDeclarationKindHow the local first entered scope — an explicit
Dim/Static(the default), or an implicitReDim.
Properties
DeclaredBy
How this local first entered its procedure scope. ReDim marks an implicit declaration a later analysis pass reports on.
public LocalDeclarationKind DeclaredBy { get; init; }
Property Value
IsStatic
true if the declaration has an explicit Static token.
public bool IsStatic { get; init; }
Property Value
Remarks
Use semantic flags instead to determine if a variable is semantically Static.
Methods
WithStaticModifier(bool)
Creates and returns a copy of this symbol with the IsStatic flag set to true unless specified otherwise.
public BoundTypedSymbol WithStaticModifier(bool value = true)
Parameters
valuebool