import { Lang } from "../lang"; import * as ast from "../ast"; /** * Parses a string as a C0 expression. * * @param str The string to parse as a C0 expression. * @param options.lang The language standard to parse. (Default C1) * @param options.types The set of strings to interpret as type identifiers. * * @throws IncompleteParseError if the parse is not a valid C0 expression, * but could be extended into a valid C0 expression. */ export declare function parseExpression(str: string, options?: { lang?: Lang; types?: Set; }): ast.Expression; /** * Parses a string as a sequence of C0 statements. * NOTE: allows the final trailing semicolon to be present or absent. * * @param str The string to parse as a sequence of C0 statements. * @param options.lang The language standard to parse. (Default C1) * @param options.types The set of strings to interpret as type identifiers. * * @throws IncompleteParseError if the parse is not a valid C0 expression, * but could be extended into a valid C0 expression. */ export declare function parseStatement(str: string, options?: { lang?: Lang; types?: Set; }): ast.Statement[]; /** * Parses a program as a series of C0 statements. * NOTE: allows the final trailing semicolon to be present or absent. * * @param str The string to parse as a C0 program. * @param options.lang The language standard to parse. (Default C1) * @param options.types The set of strings to interpret as type identifiers. * * @throws IncompleteParseError if the parse is not a valid C0 expression, * but could be extended into a valid C0 expression. */ export declare function parseProgram(lang: Lang, str: string, typedefs?: Set): ast.Declaration[];