Trilium Frontend API
    Preparing search index...

    Interface PartialParse

    Interface used to represent an in-progress parse, which can be moved forward piece-by-piece.

    interface PartialParse {
        parsedPos: number;
        stoppedAt: number;
        advance(): Tree;
        stopAt(pos: number): void;
    }
    Index

    Properties

    Methods

    Properties

    parsedPos: number

    The position up to which the document has been parsed. Note that, in multi-pass parsers, this will stay back until the last pass has moved past a given position.

    stoppedAt: number

    Reports whether stopAt has been called on this parse.

    Methods

    • Advance the parse state by some amount. Will return the finished syntax tree when the parse completes.

      Returns Tree

    • Tell the parse to not advance beyond the given position. advance will return a tree when the parse has reached the position. Note that, depending on the parser algorithm and the state of the parse when stopAt was called, that tree may contain nodes beyond the position. It is an error to call stopAt with a higher position than it's current value.

      Parameters

      • pos: number

      Returns void