Skip to main content

Struct Token

Namespace: OceanApocalypse.RSML.Language.Lexing.Tokens
Assembly: RSML.Language.Lexing.dll

Represents a RSML token.

public record struct Token : IEquatable<Token>

Implements

IEquatable<Token>

Inherited Members

Object.Equals(Object?), Object.Equals(Object?, Object?), Object.GetHashCode(), Object.GetType(), Object.ReferenceEquals(Object?, Object?), Object.ToString()

Constructors

Token(TokenKind, Object?, SourceSpan)

Represents a RSML token.

public Token(TokenKind Kind, Object? Value, SourceSpan Span)

Parameters

Kind TokenKind

An integer that identifies the type of token.

Value Object?

The token's value.

Span SourceSpan

The span where the token occurs.

Fields

Empty

Empty token. Used when something goes wrong.

public static readonly Token Empty

Field Value

Token

Properties

Kind

An integer that identifies the type of token.

public TokenKind Kind { readonly get; set; }

Property Value

TokenKind

Span

The span where the token occurs.

public SourceSpan Span { readonly get; set; }

Property Value

SourceSpan

Value

The token's value.

public Object? Value { readonly get; set; }

Property Value

Object?