Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IScanner

Defines scanner that can read and unread characters and count lines. This scanner is used by tokenizers to process input streams.

Hierarchy

  • IScanner

Implemented by

Index

Methods

column

  • column(): number
  • Gets the column in the current line

    Returns number

    The column in the current line in the stream

line

  • line(): number
  • Gets the current line number

    Returns number

    The current line number in the stream

peek

  • peek(): number
  • Returns the character from the top of the stream without moving the stream pointer.

    Returns number

    A character from the top of the stream or -1 if stream is empty.

read

  • read(): number
  • Reads character from the top of the stream.

    Returns number

    A read character or -1 if stream processed to the end.

reset

  • reset(): void
  • Resets scanner to the initial position

    Returns void

unread

  • unread(): void
  • Puts the one character back into the stream stream.

    Returns void

unreadMany

  • unreadMany(count: number): void
  • Pushes the specified number of characters to the top of the stream.

    Parameters

    • count: number

      A number of characcted to be pushed back.

    Returns void

Generated using TypeDoc