Class SimpleNameExpressionNode
- Namespace
- RDCore.SDK.Model.AST.Expressions
- Assembly
- RDCore.SDK.dll
MS-VBAL 5.6.10 Simple Name Expression
A ExpressionNode that statically resolves an expression consisting of a single identifier without any qualifiers or arguments.
public sealed record SimpleNameExpressionNode : ExpressionNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<ExpressionNode>, IEquatable<SimpleNameExpressionNode>
- Inheritance
-
SimpleNameExpressionNode
- Implements
- Inherited Members
- Extension Methods
Remarks
It is also the name of a member, after the dot of a member access.
👉 The type-declaration character a name is written with is part of what was written, and of what it means: Environ$ is not Environ. They are
two members of the library with two signatures (a String and a Variant), and a name that lost its $ on the way to being resolved would be
given the type of the one it is not. See SymbolResolverNameExtensions.
Constructors
SimpleNameExpressionNode(SyntaxNodeId, SourceLocation, string, string?, bool)
MS-VBAL 5.6.10 Simple Name Expression
A ExpressionNode that statically resolves an expression consisting of a single identifier without any qualifiers or arguments.
public SimpleNameExpressionNode(SyntaxNodeId Identity, SourceLocation Location, string IdentifierName, string? TypeHint = null, bool IsBracketed = false)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
LocationSourceLocationThe document location (
Uri+Range) of the bound expression.IdentifierNamestringThe parsed identifier name, without its type-declaration character.
TypeHintstringThe type-declaration character the name is written with (
%,&,^,!,#,@or$), or null when it is written with none.IsBracketedbooltrue when the name is written in square brackets, a foreign name (MS-VBAL §3.3.5.3):
[A1],[My Field], the member ofx.[My Field]. IdentifierName is the name without the brackets, which are how it is written and not part of it.
Remarks
It is also the name of a member, after the dot of a member access.
👉 The type-declaration character a name is written with is part of what was written, and of what it means: Environ$ is not Environ. They are
two members of the library with two signatures (a String and a Variant), and a name that lost its $ on the way to being resolved would be
given the type of the one it is not. See SymbolResolverNameExtensions.
Properties
IdentifierName
The parsed identifier name, without its type-declaration character.
public string IdentifierName { get; init; }
Property Value
IsBracketed
true when the name is written in square brackets, a foreign name (MS-VBAL §3.3.5.3): [A1], [My Field],
the member of x.[My Field]. IdentifierName is the name without the brackets, which are how it is written and not part of it.
public bool IsBracketed { get; init; }
Property Value
TypeHint
The type-declaration character the name is written with (%, &, ^, !, #, @ or $), or null when it is written with none.
public string? TypeHint { get; init; }
Property Value
WrittenName
The name as it was written: the identifier name followed by its type-declaration character, if it has one. The brackets of a foreign name (IsBracketed) are not part of it.
public string WrittenName { get; }