Encoder that transforms an AST.

interface Encoder<T> {
    pre(
        node: ASTNode,
        queryOptions: ComplexQueryOptions,
        subResults: T[],
        operator: OperatorImpl,
    ): void;
    (
        node?: ASTNode,
        queryOptions?: ComplexQueryOptions,
        subResults?: T[],
        operator?: OperatorImpl,
    ): T;
}

Type Parameters

  • T

    result type of the encoder.

  • Method that is called for each AST node. Children are visited first.

    Parameters

    Returns T

Methods

Methods

  • Optional method that is called before children are visited.

    Parameters

    Returns void