/** * path.ts * * The ast "path" is a data structure to hold both an sql tag, as well as a "stack" of all of its parents, * so we can quickly understand where a tag comes from. */ import { Tag, SqlTag } from '../grammar.types'; import { PathItem, Path } from '../load.types'; /** * Find the closest parent {@link Tag} (using predicate) */ export declare const closestParent: (predicate: (tag: SqlTag) => tag is T) => (path: Path) => T | undefined; /** * Find the closest parent {@link Path} (using predicate) */ export declare const closestParentPath: (predicate: (tag: SqlTag) => tag is T) => (path: Path) => PathItem | undefined; /** * Search for the deepest tag within a tree at a given position */ export declare const toPath: (tag: Tag, offset: number, path?: Path) => Path | undefined;