Skip to main content

Lexer

Parse and operate on GraphQL language source files.

Index

Constructors

constructor

Properties

lastToken

lastToken: Token

The previously focused non-ignored token.

line

line: number

The (1-indexed) line containing the current token.

lineStart

lineStart: number

The character offset at which the current line begins.

source

source: Source

token

token: Token

The currently focused non-ignored token.

Accessors

[toStringTag]

  • get [toStringTag](): string
  • Returns string

Methods

advance

  • Advances the token stream to the next non-ignored token.


    Returns Token

lookahead

  • Looks ahead and returns the next non-ignored token, but does not change the state of Lexer.


    Returns Token