Class Token
Represents a syntax token with position and scope information
Inherited Members
Namespace: Unity.AppUI.TextMateLib
Assembly: Unity.AppUI.TextMateLib.dll
Syntax
public class Token
Properties
EndIndex
Gets the ending position of the token in the line
Declaration
public int EndIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
Length
Gets the length of the token
Declaration
public int Length { get; }
Property Value
| Type | Description |
|---|---|
| int |
Scopes
Gets the scope stack for this token
Declaration
public IReadOnlyList<string> Scopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
StartIndex
Gets the starting position of the token in the line
Declaration
public int StartIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
GetValue(string)
Gets the value of the token from the source line
Declaration
public string GetValue(string line)
Parameters
| Type | Name | Description |
|---|---|---|
| string | line | The source line |
Returns
| Type | Description |
|---|---|
| string | The substring representing the token |
ToString()
Returns a string representation of the token
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | String representation |