Skip to content

Struct Token

Definition

Namespace: StardewUI.Framework.Grammar
Assembly: StardewUI.dll

A token emitted by the StarML Lexer.

[System.Obsolete]
public readonly ref struct Token

Inheritance
ObjectValueType ⇦ Token

Members

Constructors

Name Description
Token(TokenType, ReadOnlySpan<Char>) A token emitted by the StarML Lexer.

Properties

Name Description
Text The token type.
Type The exact text of the token in the original markup.

Methods

Name Description
Equals(Object) (Inherited from ValueType)
GetHashCode() (Inherited from ValueType)
ToString() (Overrides Object.ToString())

Details

Constructors

Token(TokenType, ReadOnlySpan<Char>)

A token emitted by the StarML Lexer.

public Token(StardewUI.Framework.Grammar.TokenType type, ReadOnlySpan<System.Char> text);
Parameters

type   TokenType
The token type.

text   ReadOnlySpan<Char>
The exact text of the token in the original markup.


Properties

Text

The token type.

public ReadOnlySpan<System.Char> Text { get; }
Property Value

ReadOnlySpan<Char>


Type

The exact text of the token in the original markup.

public StardewUI.Framework.Grammar.TokenType Type { get; }
Property Value

TokenType


Methods

ToString()

public override string ToString();
Returns

string