Skip to main content

SymbolToken

export interface SymbolToken<T extends string = string> {
  isEqual(other: Token): other is SymbolToken<T>
  kind: "symbol"
  matches(value: string | readonly string[]): boolean
  site: Site
  toString(preserveWhitespace?: boolean): string
  value: T
}
SymbolToken is a Token variant that represent a non-alphanumeric/non-whitespace sequence of characters.

Instantiate a SymbolToken with makeSymbolToken.

Properties

isEqual

isEqual(other: Token): other is SymbolToken<T>

kind

kind: "symbol"

matches

matches(value: string | readonly string[]): boolean

site

site: Site

toString

toString(preserveWhitespace?: boolean): string

value

value: T