import type { SubDeclaration, TreeSitterNode, TypeMapEntry } from '../types.js';
/**
 * Maximum recursion depth for tree-sitter AST walkers.
 * Shared across all language extractors to prevent stack overflow on deeply nested ASTs.
 */
export declare const MAX_WALK_DEPTH = 200;
export declare function nodeEndLine(node: TreeSitterNode): number;
export declare function findChild(node: TreeSitterNode, type: string): TreeSitterNode | null;
/**
 * Merge a type-map entry, keeping the higher-confidence one.
 * Shared across all language extractors that build type maps for call resolution.
 */
export declare function setTypeMapEntry(typeMap: Map<string, TypeMapEntry>, name: string, type: string, confidence: number): void;
/**
 * Python convention: __name → private, _name → protected, else undefined.
 */
export declare function pythonVisibility(name: string): 'public' | 'private' | 'protected' | undefined;
/**
 * Go convention: uppercase first letter → public, lowercase → private.
 */
export declare function goVisibility(name: string): 'public' | 'private' | 'protected' | undefined;
/**
 * Rust: check for `visibility_modifier` child (pub, pub(crate), etc.).
 */
export declare function rustVisibility(node: TreeSitterNode): 'public' | 'private';
/**
 * Walk up the parent chain to find an enclosing node whose type is in `typeNames`.
 * Returns the text of `nameField` (default `'name'`) on the matching ancestor, or null.
 *
 * Replaces per-language `findParentClass` / `findParentType` / `findCurrentImpl` helpers.
 */
export declare function findParentNode(node: TreeSitterNode, typeNames: readonly string[], nameField?: string): string | null;
/**
 * Extract child declarations from a container node's body.
 * Finds the body via `bodyFields` (tries childForFieldName then findChild for each),
 * iterates its children, filters by `memberType`, extracts `nameField`, and returns SubDeclarations.
 *
 * Replaces per-language extractStructFields / extractEnumVariants / extractEnumConstants helpers
 * for the common case where each member has a direct name field.
 */
export declare function extractBodyMembers(containerNode: TreeSitterNode, bodyFields: readonly string[], memberType: string, kind: SubDeclaration['kind'], nameField?: string, visibility?: (member: TreeSitterNode) => SubDeclaration['visibility']): SubDeclaration[];
/**
 * Strip leading/trailing quotes (single, double, or backtick) from a string.
 * Strips only the leading/trailing delimiter; interior quotes are untouched.
 */
export declare function stripQuotes(text: string): string;
/**
 * Extract the last segment of a delimited path.
 * e.g. `lastPathSegment('java.util.List', '.')` → `'List'`
 */
export declare function lastPathSegment(path: string, separator?: string): string;
export declare function extractModifierVisibility(node: TreeSitterNode, modifierTypes?: Set<string>): 'public' | 'private' | 'protected' | undefined;
//# sourceMappingURL=helpers.d.ts.map