import type { CommentToken, MinorToken, NumberToken, OperatorToken, SymbolToken } from '../lexer/types'; import type { Cursor, Node, StringTree, TemplateTree, Tree, TreeType } from '../parser/types'; export interface Checkpoint { cursor: Cursor; context: Ctx; } export declare type NodeHandler = (ctx: Ctx, tree: T) => Ctx; export declare type SymMatcherValue = string | RegExp | null; export declare type SymMatcherHandler = NodeHandler; export interface SymMatcherOptions { value: SymMatcherValue; handler: SymMatcherHandler | null; } export declare type OpMatcherValue = string | RegExp | null; export declare type OpMatcherHandler = NodeHandler; export interface OpMatcherOptions { value: OpMatcherValue; handler: OpMatcherHandler | null; } export declare type CommentMatcherValue = string | RegExp | null; export declare type CommentMatcherHandler = NodeHandler; export interface CommentMatcherOptions { value: CommentMatcherValue; handler: CommentMatcherHandler | null; } export declare type NumMatcherValue = string | RegExp | null; export declare type NumMatcherHandler = NodeHandler; export interface NumMatcherOptions { value: NumMatcherValue; handler: NumMatcherHandler | null; } export interface SeqMatcherOptions { matchers: Matcher[]; } export declare type TreeMatcherType = TreeType | null; export declare type TreeMatcherHandler = NodeHandler; export interface TreeOptionsBase { type?: TreeMatcherType; maxDepth?: number | null; maxMatches?: number | null; preHandler?: TreeMatcherHandler; postHandler?: TreeMatcherHandler; } export interface Matcher { seek(cursor: Cursor): Cursor; match(checkpoint: Checkpoint): Checkpoint | null; nextMatch(): Checkpoint | null; readonly preventSkipping?: MinorToken['type']; } export interface ManyMatcherOptions { matcher: Matcher; min: number; max: number | null; } export interface AltMatcherOptions { matchers: Matcher[]; } export declare type StrTreeHandler = NodeHandler; export interface StrTreeOptionsBase { preHandler?: StrTreeHandler | null; postHandler?: StrTreeHandler | null; } declare type StrTplHandler = NodeHandler; export interface StrTplOptionsBase { preHandler?: StrTplHandler | null; postHandler?: StrTplHandler | null; } export interface QueryBuilder { build(): Matcher; } export {}; //# sourceMappingURL=types.d.ts.map