Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a concatenation of multiple matchers. This is the normal way we compose matches, although this class needn't be used explicitly, as Microgrammars use it, via fromDefinitions or by composition involving an object literal which will be converted to a Concat. Users should only create Concats directly in the unusual case where they need to control whitespace handling in a unique way for that particular Concat.

Hierarchy

  • Concat

Implements

Index

Constructors

Private constructor

  • new Concat(definitions: any): Concat

Properties

$consumeWhiteSpaceBetweenTokens

$consumeWhiteSpaceBetweenTokens: boolean = true

$lazy

$lazy: boolean = false

$skipGaps

$skipGaps: boolean = false

definitions

definitions: any

Private firstMatcher

firstMatcher: Matcher

matchSteps

matchSteps: MatchStep[] = []

parseNodeName

parseNodeName: "Concat" = "Concat"

Accessors

$id

  • get $id(): any

_initialized

  • get _initialized(): boolean

requiredPrefix

  • get requiredPrefix(): string

Methods

_init

  • _init(): void
  • Evaluate all members to ready this Concat for use. Only call this function after using the lazy static factory method: _init is called automatically in the case of the regular Concat.of function

    Returns void

canStartWith

  • canStartWith(char: string): boolean

matchPrefix

matchPrefixReport

  • matchPrefixReport(initialInputState: InputState, thisMatchContext: any, parseContext: any): MatchReport

Static of

  • of(definitions: any): Concat
  • Normal way to create a Concat. If a $lazy field is set to true, the Concat will be lazily initialized, and _init() must be called before use.

    Parameters

    • definitions: any

    Returns Concat

Generated using TypeDoc