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

Hierarchy

  • Token

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • kind: TokenKind
    • start: number
    • end: number
    • line: number
    • column: number
    • Optional value: string

    Returns Token

Properties

column: number

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

end: number

The character offset at which this Node ends.

kind: TokenKind

The kind of Token.

line: number

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

next: Token
prev: Token

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

start: number

The character offset at which this Node begins.

value: string

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

Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.

Accessors

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

Methods

  • Returns {
        column: number;
        kind: TokenKind;
        line: number;
        value?: string;
    }

    • column: number
    • kind: TokenKind
    • line: number
    • Optional value?: string

Generated using TypeDoc