/** * The analysis phase of one compile: the context a module is analyzed in, the * analyzer that walks it, and the fixed point that settles the result types an * author omitted before the one authoritative pass runs. * * D115 §三: `index.ts` is the facade that composes a compile's phases; the * phase that owns the passes is read here, next to the budget that bounds them. * Nothing in this module names `CompileOptions`: it declares the face it reads * instead, which is what keeps it out of the package's import ring. */ import { Analyzer, type AnalysisContext } from "../analyzer.ts"; import type { Program } from "../ast.ts"; import { type Advisory, type Diagnostic } from "../diagnostic.ts"; import type { CompilerExtension } from "../extension.ts"; import type { SourceText } from "../source.ts"; /** * What the analysis phase reads from a compile's options, and nothing more. * `CompileOptions` satisfies it structurally. */ export interface ModuleAnalysisOptions { readonly analysis?: AnalysisContext; readonly resourceContents?: ReadonlyMap; /** The project manifest's extension sections, by extension id; see AnalysisContext. */ readonly extensionConfig?: ReadonlyMap; readonly executeMain?: boolean; } /** What the parse hands the analysis phase. */ export interface ParsedModuleAnalysisInput { readonly source: SourceText; readonly diagnostics: readonly Diagnostic[]; readonly advisories: readonly Advisory[]; } /** The analyzer a compile emits and reports from, with what it accumulated. */ export interface AnalyzedModule { readonly analyzer: Analyzer; readonly diagnostics: Diagnostic[]; readonly advisories: Advisory[]; } /** * One module analyzed. Semantic analysis also runs when every earlier * diagnostic recovered as the guided spelling, so the caller's emission gate — * not this phase — decides whether the module compiles. */ export declare function analyzeModule(semanticProgram: Program, parsed: ParsedModuleAnalysisInput, options: ModuleAnalysisOptions, extensions: readonly CompilerExtension[]): AnalyzedModule; //# sourceMappingURL=analysis.d.ts.map