/// <reference types="source-map" />
import { FragmentCtr, Rule, RuleBook } from './CompilerInterface';
import { Token } from "./Token";
import { CodeWithSourceMap } from 'source-map';
export interface CompilerOptions {
    file: string;
}
export default class Compiler {
    private rules;
    private fragmentsBefore;
    private fragmentsAfter;
    constructor(rules: RuleBook);
    use(rule: Rule): void;
    addFragment(position: "before" | "after", f: FragmentCtr): void;
    compile(input: string, options: CompilerOptions): CodeWithSourceMap;
    processTokens(tokens: Token[], options: CompilerOptions): CodeWithSourceMap;
    private prettyPrintError(e, text, file);
    private getRule(t);
}
