Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Concatenation

The externally useful interface of Concat.

Hierarchy

Implemented by

Index

Properties

Optional $id

$id: string

definitions

definitions: ConcatDefinitions

Optional requiredPrefix

requiredPrefix: string

Optimization property. Prefix that's required for this to match. Return undefined if we don't know. If we can provide this information, it can make matching much more efficient if this is the first matcher in a Microgrammar.

Methods

Optional canStartWith

  • canStartWith(char: string): boolean

matchPrefix

  • Former core matching method. Now, this should be a wrapper around matchPrefixReport Implement as: toMatchPrefixResult(this.matchPrefixReport(is, thisMatchContext, parseContext));

    deprecated

    favor matchPrefixReport

    Parameters

    • is: InputState

      input state

    • thisMatchContext: __type

      context for this match, beginning from the top level and passed into nested matchers

    • parseContext: __type

      context for the whole parsing operation we're in: e.g. parsing a file

    Returns MatchPrefixResult

matchPrefixReport

  • Core matching method. Can we match at the present point in the given InputState? Context arguments may be used by matchers that require knowledge of current match or global context.

    Parameters

    • is: InputState

      input state

    • thisMatchContext: __type

      context for this match, beginning from the top level and passed into nested matchers

    • parseContext: __type

      context for the whole parsing operation we're in: e.g. parsing a file

    Returns MatchReport

Generated using TypeDoc