Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/drash/src/services/graphql/graphql.ts>GraphQL.Token

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
class GraphQL.Token
import { GraphQL } from "https://deno.land/x/drash@v2.8.1/src/services/graphql/graphql.ts";
const { Token } = GraphQL;

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.

Methods

toJSON(): { kind: TokenKindEnum; value: string | undefined; line: number; column: number; }