Class TokenStream

Constructors

Accessors

Methods

  • Test the current token, then, if the test is successful, sets the pointer to the next one and returns the tested token.

    Parameters

    • primary: TokenType
    • secondary: string | string[] = null

    Returns Token

    The next token if the condition is true, null otherwise

  • Test the current token.

    Parameters

    • type: TokenType
    • value: string | number | string[] = null

    Returns boolean