import type { IndexedFile, ParseResult } from './types.js';
/** Returns true if tree-sitter native modules loaded successfully. */
export declare function isTreeSitterAvailable(): boolean;
/** Base class for tree-sitter-based language parsers. */
declare abstract class TreeSitterLanguageParser {
    abstract readonly language: string;
    abstract readonly extensions: string[];
    protected createParser(grammar: any): any;
    abstract parseFile(filePath: string, content: string): ParseResult;
    shouldParse(filePath: string): boolean;
    /** Recursively find all nodes of a given type. */
    protected findNodes(node: any, type: string): any[];
    /** Find the first child of a given field name. */
    protected getField(node: any, field: string): any | null;
    /** Count cyclomatic complexity by finding control-flow nodes. */
    protected estimateComplexity(node: any, keywords: string[]): number;
    protected makeFile(filePath: string, content: string, language: string, isTest: boolean): Omit<IndexedFile, 'id'>;
}
/** Tree-sitter Python parser. */
export declare class TreeSitterPythonParser extends TreeSitterLanguageParser {
    readonly language = "python";
    readonly extensions: string[];
    private grammar;
    constructor();
    parseFile(filePath: string, content: string): ParseResult;
    private extractDocstring;
}
/** Tree-sitter Go parser. */
export declare class TreeSitterGoParser extends TreeSitterLanguageParser {
    readonly language = "go";
    readonly extensions: string[];
    private grammar;
    constructor();
    parseFile(filePath: string, content: string): ParseResult;
    private extractReceiver;
    private extractStructFields;
    private extractInterfaceMethods;
    private extractComment;
}
/** Tree-sitter Rust parser. */
export declare class TreeSitterRustParser extends TreeSitterLanguageParser {
    readonly language = "rust";
    readonly extensions: string[];
    private grammar;
    constructor();
    parseFile(filePath: string, content: string): ParseResult;
    private parseRustFunction;
    private extractRustFields;
    private extractRustDocComment;
}
export {};
//# sourceMappingURL=tree-sitter-parser.d.ts.map