Class LineLabelNode
A syntax node representing a line label directive, which is procedure metadata that defines a named symbol for various jump targets.
public record LineLabelNode : DirectiveNode, IEquatable<SyntaxNode>, IEquatable<DirectiveNode>, IEquatable<LineLabelNode>
- Inheritance
-
LineLabelNode
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
LineLabelNode(SyntaxNodeId, SourceLocation, string)
A syntax node representing a line label directive, which is procedure metadata that defines a named symbol for various jump targets.
public LineLabelNode(SyntaxNodeId Identity, SourceLocation SourceLocation, string Name)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the bound expression.NamestringThe label name, without the square brackets of a bracketed name (IsBracketed):
Try Againfor[Try Again]:, the name aGoTo [Try Again]names (IdentifierName).
Properties
IsBracketed
Whether the name is written in square brackets ([Try Again]:), as IsBracketed says of a name
in an expression.
public bool IsBracketed { get; init; }
Property Value
Name
The label name, without the square brackets of a bracketed name (IsBracketed): Try Again for [Try Again]:, the name a
GoTo [Try Again] names (IdentifierName).
public string Name { get; init; }
Property Value
NameRange
Where the label's name is written, without the colon that ends the label and with the square brackets of a bracketed name ([Try Again]:):
what a rename of the label replaces. null for a line number (LineNumberNode), which is a number and not a name, and
when it is not known.
public SourceRange? NameRange { get; init; }