/** * Web Tree-Sitter Adapter — web-tree-sitter implementation of the tree-sitter adapter * * This is a concrete implementation of TreeSitterAdapter using the web-tree-sitter * WASM-based parser library. The interfaces are defined separately to allow for * other implementations (native tree-sitter, mock parsers for testing, etc.) * * Benefits: * - Implements library-agnostic TreeSitterAdapter interface * - Can be swapped with other implementations without changing consumers * - Isolates all web-tree-sitter and tree-sitter-wasms dependencies to this file */ import type { ASTLanguage } from '../ast.types.js'; import type { TreeSitterAdapter, TreeSitterLanguage, TreeSitterParser } from './tree-sitter-adapter.interface.js'; /** * Web Tree-Sitter Adapter Implementation * * Concrete implementation of TreeSitterAdapter using the web-tree-sitter WASM library. */ export declare class WebTreeSitterAdapter implements TreeSitterAdapter { /** * Clear all cached grammars and reset parser state */ clearCache(): void; /** * Create a new parser instance configured for a language */ createParser(language: ASTLanguage): Promise; /** * Load a language grammar (cached after first load) */ loadLanguage(language: ASTLanguage): Promise; } /** * Default adapter instance factory * This is used by the getTreeSitterAdapter function in the interface */ export declare function createDefaultTreeSitterAdapter(): TreeSitterAdapter; //# sourceMappingURL=tree-sitter-adapter.d.ts.map