class SyntaxToken
extends AbstractToken

Represents a syntax token in the tokenizer.

Constructors

new
SyntaxToken(
tokenKind: TokenKind,
location: Location,
text: string,
leadingTrivia: Trivia[],
trailingTrivia: Trivia[],
)

Creates an instance of SyntaxToken.

Methods

toString(): string

Converts the token to a string representation, including leading and trailing trivia.

Usage

import { SyntaxToken } from ".";