import { EventEmitter } from "events";
import { Token } from "../lexer";
import { FilterResults } from "./Preprocessor";
export declare class Preprocessor {
    private readonly parser;
    private readonly _preprocessor;
    readonly events: EventEmitter<[never]>;
    /**
     * Convenience function to subscribe to the `err` events emitted by `preprocessor.events`.
     * @param errorHandler the function to call for every preprocessing error emitted after subscribing
     * @returns an object with a `dispose` function, used to unsubscribe from errors
     */
    onError(errorHandler: (err: BrsError | ParseError) => void): {
        dispose: () => void;
    };
    /**
     * Convenience function to subscribe to a single `err` event emitted by `preprocessor.events`.
     * @param errorHandler the function to call for the first preprocessing error emitted after subscribing
     */
    onErrorOnce(errorHandler: (err: BrsError | ParseError) => void): void;
    constructor();
    /**
     * Pre-processes a set of tokens, evaluating any conditional compilation directives encountered.
     * @param tokens the set of tokens to process
     * @param manifest the data stored in the found manifest file
     * @returns an array of processed tokens representing a subset of the provided ones
     */
    preprocess(tokens: readonly Token[], manifest: Map<string, string>): FilterResults;
}
/**
 * Parses a 'manifest' file's `bs_const` property into a map of key to boolean value.
 * @param manifest the internal representation of the 'manifest' file to extract `bs_const` from
 * @returns a map of key to boolean value representing the `bs_const` attribute, or an empty map if
 *          no `bs_const` attribute is found.
 */
export declare function getBsConst(manifest: Map<string, string>): Map<string, boolean>;
import * as Chunk from "./Chunk";
import { BrsError } from "../error/BrsError";
import { ParseError } from "../parser";
export { Chunk };
export { Parser } from "./Parser";
