/** * `parseProject` driver that sources each file's parse from a * `LanguageAdapter` (ADR-0010) instead of an inline grammar-bound parser. * It is byte-for-byte equivalent to `createTreeSitterParseProject`'s loop — * same read, same `ParseError` messages, same `hasError` "record but keep the * partial tree" behavior, same completion log — but the per-file parse is * `adapter.parse(source, path)`. This is what lets the graph Python adapter * consume `@opensip-tools/lang-python` so there is one parser per language. * * Total over `input.files` per invariant I-7: every file either parses or * surfaces in `parseErrors`. The adapter's `parse` is synchronous (its grammar * loads at module top level), so `parseProject` stays synchronous. */ import type { TreeSitterParsedProject } from './parse.js'; import type { LanguageAdapter } from '@opensip-tools/core'; import type { ParseInput, ParseOutput } from '@opensip-tools/graph'; import type { ParsedFile } from '@opensip-tools/tree-sitter'; /** * Build a graph `parseProject` from a tree-sitter-backed `LanguageAdapter` * (one whose `parse` returns the `{ tree, source }` `ParsedFile` shape). The * adapter's `id` is the `graph:parse:` log-tag suffix. */ export declare function createParseProjectFromAdapter(adapter: LanguageAdapter): (input: ParseInput) => ParseOutput; //# sourceMappingURL=parse-from-adapter.d.ts.map