/** * Tree-sitter parser integration for AiDex */ import Parser from 'tree-sitter'; export type SupportedLanguage = 'csharp' | 'typescript' | 'javascript' | 'rust' | 'python' | 'c' | 'cpp' | 'java' | 'go' | 'php' | 'ruby' | 'hcl' | 'astro' | 'kotlin' | 'swift'; /** * Get or create a parser for the given language */ export declare function getParser(language: SupportedLanguage): Parser; /** * Detect language from file extension */ export declare function detectLanguage(filePath: string): SupportedLanguage | null; /** * Check if a file extension is supported */ export declare function isSupported(filePath: string): boolean; /** * Get all supported file extensions */ export declare function getSupportedExtensions(): string[]; /** * Parse source code and return the syntax tree */ export declare function parse(sourceCode: string, language: SupportedLanguage): Parser.Tree; /** * Extract TypeScript frontmatter from an Astro file. * Astro frontmatter is the content between the opening and closing `---` fences. * Returns the frontmatter source padded with blank lines to preserve original line numbers, * or null if no frontmatter block is present. */ export declare function extractAstroFrontmatter(source: string): string | null; /** * Parse a file's content with auto-detected language */ export declare function parseFile(sourceCode: string, filePath: string): Parser.Tree | null; //# sourceMappingURL=tree-sitter.d.ts.map