Class LiteralToken<ValueT>

This represents a token which contains a literal value (e.g. string literal, number literal and identifiers.).

Type Parameters

  • ValueT

Hierarchy (view full)

Constructors

Properties

extraTokens: ExtraToken[] = []

All the newlines and comments that appear before this token and should be preserved when printing the AST.

lexeme: string
span: CodeSpan
startWithWhitespace: CodeLocation

Start of this token, including all the whitespace before it.

Set externally in the lexer.

type: TokenType
value: ValueT

Methods