/**
 * Shared Code Analysis Utilities
 *
 * ParsedFile-aware versions of control flow analysis and context extraction.
 * Consolidates duplicated logic from control-flow.ts and various detectors.
 */
import { ParsedFile } from './parsed-file';
/**
 * Check if a line is inside a try-catch block.
 * Tracks brace depth from the start of the file to the target line.
 */
export declare function isInsideTryCatch(file: ParsedFile, lineNumber: number): boolean;
/**
 * Simpler heuristic: check if there's a try-catch in the same function scope.
 * Looks for try { before the line and } catch after, within reasonable bounds.
 */
export declare function hasTryCatchNearby(file: ParsedFile, lineNumber: number, windowSize?: number): boolean;
/**
 * Extract function context where a call is being made.
 * Looks backwards from the current line to find enclosing function name.
 * Returns lowercase function name or null if not found.
 */
export declare function extractFunctionContext(file: ParsedFile, lineNumber: number): string | null;
/**
 * Search surrounding lines for any of the given patterns.
 * Consolidates the ±N line search pattern used across 55+ occurrences.
 *
 * @param file ParsedFile to search in
 * @param lineIndex 0-based center line
 * @param patterns RegExp patterns to search for
 * @param windowSize number of lines before and after to search
 * @returns found: true if any pattern matched, with matched line and pattern
 */
export declare function searchSurroundingLines(file: ParsedFile, lineIndex: number, patterns: RegExp[], windowSize: number): {
    found: boolean;
    matchedLine?: number;
    matchedPattern?: RegExp;
};
//# sourceMappingURL=code-analysis.d.ts.map