import type { WireNode } from '@liendev/parser-native'; import type { OffsetMaps } from './offset-map.js'; export interface CompatPosition { row: number; column: number; } /** * Structural reconstruction of a tree-sitter SyntaxNode from the native * parser's wire format. Implements only the members ast/** consumers * actually use (native-parser.md section 2.2). */ export declare class CompatSyntaxNode { readonly type: string; readonly isNamed: boolean; readonly isMissing: boolean; readonly hasError: boolean; readonly children: CompatSyntaxNode[]; readonly namedChildren: CompatSyntaxNode[]; readonly childCount: number; readonly namedChildCount: number; parent: CompatSyntaxNode | null; readonly startIndex: number; readonly endIndex: number; readonly startPosition: CompatPosition; readonly endPosition: CompatPosition; private readonly fieldMap; private readonly source; private cachedText; constructor(wire: WireNode, source: string, maps: OffsetMaps); get text(): string; child(index: number): CompatSyntaxNode | null; namedChild(index: number): CompatSyntaxNode | null; childForFieldName(name: string): CompatSyntaxNode | null; } export interface CompatTree { rootNode: CompatSyntaxNode; } /** * Reconstruct a full compat tree from one native parseTree() wire payload. * Eager: the whole tree is built in a single recursive pass immediately * after JSON.parse (native-parser.md section 2.1) -- children and * namedChildren are real arrays, not lazy getters. */ export declare function buildCompatTree(wireRoot: WireNode, source: string): CompatTree; //# sourceMappingURL=compat-node.d.ts.map