Options
All
  • Public
  • Public/Protected
  • All
Menu

A simple string scanner that is used by the template parser to find tokens in template strings.

Hierarchy

  • MustacheScanner

Index

Constructors

Properties

Methods

Constructors

constructor

  • Initializes a new instance of the MustacheScanner class.

    Parameters

    • string: string

    Returns MustacheScanner

Properties

pos

pos: number

string

string: string

tail

tail: string

Methods

eos

  • eos(): boolean
  • Returns true if the tail is empty (end of string).

    Returns boolean

scan

  • scan(re: RegExp): string
  • Tries to match the given regular expression at the current position.

    Parameters

    • re: RegExp

      The regex-pattern to match.

    Returns string

    The matched text if it can match, the empty string otherwise.

scanUntil

  • scanUntil(re: RegExp): string
  • Skips all text until the given regular expression can be matched.

    Parameters

    • re: RegExp

      The regex-pattern to match.

    Returns string

    Returns the skipped string, which is the entire tail if no match can be made.

Generated using TypeDoc