TextToken
public struct TextTokenFlat token struct output by the tokenizer. References ranges into the source text via indices.
Fields
Section titled “Fields”
public TokenKind kindReturns
TextStudio.TokenKind
sourceStart
Section titled “sourceStart”public int sourceStartReturns
System.Int32
sourceEnd
Section titled “sourceEnd”public int sourceEndReturns
System.Int32
nameHash
Section titled “nameHash”public int nameHashReturns
System.Int32
parameterStart
Section titled “parameterStart”public int parameterStartReturns
System.Int32
parameterEnd
Section titled “parameterEnd”public int parameterEndReturns
System.Int32
nestingDepth
Section titled “nestingDepth”public int nestingDepthReturns
System.Int32
outerStart
Section titled “outerStart”public int outerStartReturns
System.Int32
outerEnd
Section titled “outerEnd”public int outerEndReturns
System.Int32
nameEnd
Section titled “nameEnd”public int nameEndReturns
System.Int32
selfClosing
Section titled “selfClosing”public bool selfClosingReturns
System.Boolean
Methods
Section titled “Methods”
GetNameSpan(string)
Section titled “GetNameSpan(string)”public ReadOnlySpan<char> GetNameSpan(string source)Gets the tag-name slice from the original source without allocating.
Parameters
| Name | Type |
|---|---|
source |
System.String |
Returns
System.ReadOnlySpan{System.Char}
GetParameterSpan(string)
Section titled “GetParameterSpan(string)”public ReadOnlySpan<char> GetParameterSpan(string source)Gets the raw parameter slice from the original source without allocating.
Parameters
| Name | Type |
|---|---|
source |
System.String |
Returns
System.ReadOnlySpan{System.Char}
Properties
Section titled “Properties”
Length
Section titled “Length”public int Length { get; }Returns
System.Int32