Class Scanner

Constructors

Properties

_lastStart: number = 0
index: number
r: string

Accessors

Methods

  • Private

    read reads the next rune from the buffered reader. Returns the \x00 if an error or io.EOF occurs.

    Returns string

  • scan reads and returns the next available token value from the scanner's buffer.

    Returns Token

  • Private

    scanComment consumes all contiguous single line comment runes.

    Returns Token

  • Private

    scanGroup consumes all runes within a group/parenthesis.

    Returns Token

  • Private

    scanIdentifier consumes all contiguous identifier runes.

    Returns Token

  • Private

    scanWhitespace consumes all contiguous whitespace runes.

    Returns Token

  • Private

    unread places the previously read rune back on the reader.

    Returns void