Class Token

Token Class

Serves as a character or keyword with special meaning

Hierarchy

  • Token

Constructors

Properties

Methods

Constructors

  • Token constructor

    Parameters

    • literal: string

      The literal expression of this token

    • type: string

      The type of this token

    • priority: number

      The priority this token has in an operation (-1, if it should not be considered for running operations, ie a variable)

    • char: number

      The column the character or keyword starts at

    Returns Token

Properties

char: number

The column number of the character for error messages

literal: string

The raw content of a token

priority: number

The priority of the token.

value is -1 if should not be taken into account in operator calls Variable Tokens are arguments to operators, thus, they do not have a priority, their operators have.

type: string

The type of this token can be either operator, variable, argOpen, argClose, function, functionCall

Methods

  • calculate a singular token

    Returns

    the input value

    Parameters

    • input: boolean[]

      an array of input bits

    • profile: string

      the expression's profile

    Returns boolean

Generated using TypeDoc