UNPKG

ripbug-ai-detector

Version:

🔥 RipBug AI Bug Detector - Built by an AI that rips its own bugs. Destroy AI-generated bugs before you commit.

45 lines • 1.36 kB
import { FunctionInfo } from '../types/analysis'; declare module 'tree-sitter' { interface SyntaxNode { childForFieldName(fieldName: string): SyntaxNode | null; } } export declare class TreeSitterParser { private jsParser; private tsParser; constructor(); extractFunctions(content: string, filePath: string): FunctionInfo[]; extractFunctionCalls(content: string, filePath: string): Array<{ name: string; file: string; line: number; column: number; context: string; arguments: string[]; }>; extractImports(content: string, filePath: string): Array<{ type: 'import' | 'export'; source: string; specifiers: string[]; line: number; isDefault: boolean; }>; private traverseTree; private parseFunctionDeclaration; private parseArrowFunction; private parseMethodDefinition; private parseParameters; private parseTypedParameter; private extractFirstIdentifier; private findFunctionCalls; private parseMemberCall; private parseArguments; private findImportsExports; private parseImportSpecifiers; private parseExportSpecifiers; private isExported; private isAsync; private isDefaultImport; private isDefaultExport; } //# sourceMappingURL=tree-sitter-parser.d.ts.map