tree-sitter - v0.25.1
    Preparing search index...

    Type Alias QueryOptions

    type QueryOptions = {
        endIndex?: number;
        endPosition?: Point;
        matchLimit?: number;
        maxStartDepth?: number;
        progressCallback?: (index: number) => boolean;
        startIndex?: number;
        startPosition?: Point;
        timeoutMicros?: number;
    }
    Index

    Properties

    endIndex?: number

    The ending byte offset in which the query will be executed.

    endPosition?: Point

    The ending row/column position in which the query will be executed.

    matchLimit?: number

    The maximum number of in-progress matches for this cursor. The limit must be > 0 and <= 65536.

    maxStartDepth?: number

    The maximum start depth for a query cursor.

    This prevents cursors from exploring children nodes at a certain depth. Note if a pattern includes many children, then they will still be checked.

    The zero max start depth value can be used as a special behavior and it helps to destructure a subtree by staying on a node and using captures for interested parts. Note that the zero max start depth only limit a search depth for a pattern's root node but other nodes that are parts of the pattern may be searched at any depth what defined by the pattern structure.

    progressCallback?: (index: number) => boolean

    A callback that receives the query state during execution.

    Type Declaration

      • (index: number): boolean
      • Parameters

        • index: number

          The current byte offset

        Returns boolean

        true to stop the query or false to continue

    startIndex?: number

    The starting byte offset in which the query will be executed.

    startPosition?: Point

    The starting row/column position in which the query will be executed.

    timeoutMicros?: number

    The maximum duration in microseconds that query execution should be allowed to take before halting.

    If query execution takes longer than this, it will halt early, returning None.

    Use the progressCallback