Hierarchy

  • FluentParser

Constructors

Properties

withSpans: boolean

Methods

  • Create a token representing an indent. It's not part of the AST and it will be trimmed and merged into adjacent TextElements, or turned into a new TextElement, if it's surrounded by two Placeables.

    Parameters

    • ps: FluentParserStream
    • value: string
    • start: number

    Returns Indent

  • Parameters

    • ps: FluentParserStream
    • u: string
    • digits: number

    Returns string

  • maybeGetPattern distinguishes between patterns which start on the same line as the identifier (a.k.a. inline signleline patterns and inline multiline patterns) and patterns which start on a new line (a.k.a. block multiline patterns). The distinction is important for the dedentation logic: the indent of the first line of a block pattern must be taken into account when calculating the maximum common indent.

    Parameters

    • ps: FluentParserStream

    Returns null | Pattern

  • Parse the first Message or Term in source.

    Skip all encountered comments and start parsing at the first Message or Term start. Return Junk if the parsing is not successful.

    Preceding comments are ignored unless they contain syntax errors themselves, in which case Junk for the invalid comment is returned.

    Parameters

    • source: string

    Returns Entry