docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Token

    Represents a syntax token with position and scope information

    Inheritance
    object
    Token
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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

    Overrides
    object.ToString()
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)