Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Readonly contexts

contexts: Node[]

end

end: boolean

next

next: NextNodes

Readonly value

value: Value

Methods

completePattern

completeWord

isLeaf

  • isLeaf(): boolean

matchChars

  • matchChars(word: string): null | Node
  • Given an word, returns the final node which matches the complete word. null otherwise.

    Parameters

    • word: string

    Returns null | Node

matchPattern

  • matchPattern(tokens: string[]): Match[]
  • Given a sequence of tokens, returns a list of the greatest common nodes in a pattern and their corresponding remainders (see Node.matchPattern and [[Match]] for details).

    However, unlike Node.matchPattern, this method attempts to resolve any results with remainders at this contextual-level. That is, if a result from a matchPattern call on a sub-context has remainders, this method will attempt to extend the match by trying to match the remainder token sequence with the subsequent words in the pattern.

    Parameters

    • tokens: string[]

      input tokens we wish to pattern match.

    Returns Match[]

matchWord

  • matchWord(tokens: string[]): Match[]

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Property

Generated using TypeDoc