Class StringParser

Hierarchy

  • StringParser

Constructors

Properties

line: number
token: number
tokens: string[][]

Methods

  • Checks if the parser has reached the end of the string

    Returns

    True if the parser has reached the end of the string, false otherwise

    Returns boolean

  • Consumes the current token if it matches the expected token

    Returns

    True if the current token matches the expected token and was consumed, false otherwise

    Parameters

    • token: string

      The expected token

    Returns boolean

  • Checks the next token in the string without consuming it

    Returns

    The next token in the string

    Returns string

  • Reads and consumes the rest of the current line

    Returns

    The rest of the current line as an array of strings

    Returns string[]

  • Reads and consumes the next token in the string as a number

    Returns

    The next token in the string as a number

    Returns number

  • Reads and consumes the next token in the string

    Returns

    The next token in the string

    Returns string

Generated using TypeDoc