Class VBLocalConstantSymbol
A TypedSymbol representing a procedure-local Const declaration (MS-VBAL §5.4.3.2).
A local constant statically evaluates to a value of a fixed VBType, is visible only
within its declaring procedure, and cannot be assigned at run-time; a module-level Const is
modelled by VBConstantMemberSymbol and an Enum member by
VBEnumConstMemberSymbol.
public record VBLocalConstantSymbol : BoundTypedSymbol, IEquatable<Symbol>, IEquatable<WorkspaceSymbol>, ITypedSymbol, IEquatable<BoundTypedSymbol>, IEquatable<VBLocalConstantSymbol>
- Inheritance
-
VBLocalConstantSymbol
- Implements
- Inherited Members
Constructors
VBLocalConstantSymbol(Uri, Uri, string, SourceRange, SourceRange, VBType?, ExpressionNode?)
A TypedSymbol representing a procedure-local Const declaration (MS-VBAL §5.4.3.2).
A local constant statically evaluates to a value of a fixed VBType, is visible only
within its declaring procedure, and cannot be assigned at run-time; a module-level Const is
modelled by VBConstantMemberSymbol and an Enum member by
VBEnumConstMemberSymbol.
public VBLocalConstantSymbol(Uri WorkspaceRoot, Uri ParentUri, string Name, SourceRange Range, SourceRange SelectionRange, VBType? ResolvedType = null, ExpressionNode? Value = null)
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 declaring procedure symbol.NamestringThe identifier name 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.ResolvedTypeVBTypeThe resolved VBType of the constant, if available. VBUnknownType unless specified otherwise.
ValueExpressionNodeThe declaration's own constant expression, or
nullwhen there is none. A constant has no storage to read a value from — it is substituted at each of its use sites (MS-VBAL §5.4.3.2: "a constant statically evaluates to a value") — so this expression is the symbol's value.
Properties
Value
The declaration's own constant expression, or null when there is none. A constant has no
storage to read a value from — it is substituted at each of its use sites (MS-VBAL §5.4.3.2:
"a constant statically evaluates to a value") — so this expression is the symbol's value.
public ExpressionNode? Value { get; init; }