Class VariableDeclarationNode
- Namespace
- RDCore.SDK.Model.AST.Declarations
- Assembly
- RDCore.SDK.dll
An AST node representing a variable declaration — a procedure-local Dim/Static
(child of a member node) or a module-level field (child of the module node). An
ArrayBoundsNode child, when present, carries the (…) array-dimension clause.
public record VariableDeclarationNode : SyntaxNode, IEquatable<SyntaxNode>, IEquatable<VariableDeclarationNode>
- Inheritance
-
VariableDeclarationNode
- Implements
- Inherited Members
Constructors
VariableDeclarationNode(SyntaxNodeId, SourceLocation, string, ImmutableArray<SyntaxNode>, AccessModifier, string?, bool, bool)
An AST node representing a variable declaration — a procedure-local Dim/Static
(child of a member node) or a module-level field (child of the module node). An
ArrayBoundsNode child, when present, carries the (…) array-dimension clause.
public VariableDeclarationNode(SyntaxNodeId Identity, SourceLocation SourceLocation, string Name, ImmutableArray<SyntaxNode> Children, AccessModifier AccessModifier = AccessModifier.Implicit, string? TypeHint = null, bool IsWithEvents = false, bool IsStatic = false)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe source location of this module; the
SourceRangeis invalid.NamestringThe declared identifier name of the member.
ChildrenImmutableArray<SyntaxNode>AccessModifierAccessModifierThe access modifier, if one was supplied.
TypeHintstringThe type hint token, if one was supplied.
IsWithEventsbooltrueif the variable is aWithEventsfield.IsStaticbooltrueif the declaration has an explicitStatictoken (MS-VBAL §5.4.3.1).
Properties
AccessModifier
The access modifier, if one was supplied.
public AccessModifier AccessModifier { get; init; }
Property Value
IsStatic
true if the declaration has an explicit Static token (MS-VBAL §5.4.3.1).
public bool IsStatic { get; init; }
Property Value
IsWithEvents
true if the variable is a WithEvents field.
public bool IsWithEvents { get; init; }
Property Value
Name
The declared identifier name of the member.
public string Name { get; init; }
Property Value
TypeHint
The type hint token, if one was supplied.
public string? TypeHint { get; init; }