import { EventEmitter } from "events"; import { Token } from "../lexer"; import { ParseError } from "../parser"; import * as CC from "./Chunk"; /** The results of a chunk-parser's parsing pass. */ export interface ChunkParserResult { /** The chunks produced by the chunk-parser. */ chunks: ReadonlyArray; /** The errors encountered by the chunk-parser. */ errors: ReadonlyArray; } /** * Parses `Tokens` into chunks of tokens, excluding conditional compilation directives. */ export declare class Parser { readonly events: EventEmitter<[never]>; /** * Parses an array of tokens into an array of "chunks" - conditional compilation directives and their * associated BrightScript. * * @param toParse the array of tokens to parse * @returns an array of chunks (conditional compilation directives and the associated BrightScript) to be later * executed. */ parse(toParse: ReadonlyArray): ChunkParserResult; }