ripple-ai-detector
Version:
🌊 Ripple AI Bug Detector - Built by an AI that knows its flaws. Catch AI-generated bugs before you commit.
29 lines • 1.04 kB
TypeScript
import Parser from 'tree-sitter';
import { FunctionInfo, ImportInfo, ExportInfo } from '../types/analysis';
export declare class ASTParser {
private jsParser;
private tsParser;
constructor();
parseFile(content: string, isTypeScript?: boolean): Parser.Tree;
extractFunctions(tree: Parser.Tree, filePath: string): FunctionInfo[];
extractFunctionCalls(tree: Parser.Tree, filePath: string): Array<{
name: string;
file: string;
line: number;
column: number;
context: string;
}>;
extractImports(tree: Parser.Tree, filePath: string): ImportInfo[];
extractExports(tree: Parser.Tree, filePath: string): ExportInfo[];
private parseFunctionDeclaration;
private parseArrowFunction;
private parseMethodDefinition;
private parseParameters;
private parseParameter;
private parseFunctionCall;
private parseImportStatement;
private parseExportStatement;
private isExported;
private getLineContext;
}
//# sourceMappingURL=ast-parser.d.ts.map