import type { Cst, CstLeaf } from "./cst-parser"; import { CstNode } from "./cst-parser"; export declare function parseCode(code: string): undefined | Cst; export declare const visit: (node: Cst) => string; export declare const childByType: (node: Cst, type: string) => undefined | CstNode; export declare const childIdxByType: (node: Cst, type: string) => number; export declare const childrenByType: (node: Cst, type: string) => CstNode[]; export declare const nonLeafChild: (node: undefined | Cst) => undefined | CstNode; export declare const childByField: (node: Cst, field: string) => undefined | CstNode; export declare const childrenByField: (node: Cst, field: string) => CstNode[]; export declare const childIdxByField: (node: Cst, field: string) => number; export declare const childLeafWithText: (node: undefined | Cst, text: string) => undefined | CstLeaf; export declare const childLeafIdxWithText: (node: undefined | Cst, text: string) => number; export declare const textOfId: (node: Cst) => string; export declare function countNewlines(leaf: undefined | Cst): number; export declare function trailingNewlines(node: Cst): number; export declare function isComment(node: Cst): boolean; export declare function isInlineComment(node: Cst): boolean; export declare function filterComments(nodes: readonly Cst[]): CstNode[]; export declare function containsComments(nodes: readonly Cst[]): boolean; export declare function commentText(node: CstNode): string;