Skip to main content
Module

x/graphql_deno/mod.ts>Token

GraphQL-JS ported to Deno
Latest
class Token
import { Token } from "https://deno.land/x/graphql_deno@v15.0.0/mod.ts";

Represents a range of characters represented by a lexical token within a Source.

Constructors

new
Token(
start: number,
end: number,
line: number,
column: number,
prev: Token | null,
value?: string,
)

Properties

readonly
column: number

The 1-indexed column number at which this Token begins.

readonly
end: number

The character offset at which this Node ends.

readonly
kind: TokenKindEnum

The kind of Token.

readonly
line: number

The 1-indexed line number on which this Token appears.

readonly
next: Token | null
readonly
prev: Token | null

Tokens exist as nodes in a double-linked-list amongst all tokens including ignored tokens. is always the first node and the last.

readonly
start: number

The character offset at which this Node begins.

readonly
value: string | undefined

For non-punctuation tokens, represents the interpreted value of the token.