import type { Script } from '../ast/index.js'; import type { DiagnosticSink } from '../diagnostics/index.js'; import type { SourceFile } from '../source/index.js'; import type { Token } from '../tokens/index.js'; /** * A file, which is a list of statements and function declarations. * * Section 19 writes a file as a version line, a declaration and a limits line * followed by the rest. The prose wins: the declaration being missing is * OS2007, two of them is OS2008, and a version line that is not first is * OS1021, all of which name a line and suggest a move. So every line here is an * item in source order, a file with no declaration still has a tree, and the * checker is left holding the questions that are its to answer. * * Nothing in this file throws and nothing stops early. A statement that could * not be read costs its own line and, where it opened one, its block; the next * line is read as though nothing had happened, which is what lets a file with * three mistakes in it produce three diagnostics from one compile. */ export declare function parse(file: SourceFile, diagnostics: DiagnosticSink): Script; /** The same, for a host that has already lexed the file and kept the tokens. */ export declare function parseTokens(file: SourceFile, tokens: readonly Token[], diagnostics: DiagnosticSink): Script; //# sourceMappingURL=script.d.ts.map