import { TagToken, LexerTagDefinitionContract, MustacheToken } from 'edge-lexer';
import { Parser } from '../Parser';
import { EdgeBuffer } from '../EdgeBuffer';
/**
 * The parser needs the `compile` method on every tag
 */
export interface ParserTagDefinitionContract extends LexerTagDefinitionContract {
    compile(parser: Parser, buffer: EdgeBuffer, token: TagToken): void;
}
/**
 * Loc node from Acorn
 */
export type AcornLoc = {
    start: {
        line: number;
        column: number;
    };
    end: {
        line: number;
        column: number;
    };
};
export type TagTransformer = (tag: TagToken) => void;
export type MustacheTransformer = (tag: MustacheToken) => void;
export type ClaimTagFn = (name: string) => LexerTagDefinitionContract | null;
export type OnLineFn = (line: string) => string;
/**
 * Parser options
 */
export type ParserOptions = {
    /**
     * Is parsing in async mode
     */
    async?: boolean;
    /**
     * Modify the line before it is being processed by the lexer
     */
    onLine?: OnLineFn;
    /**
     * Modify the tag before it is being processed by the parser
     */
    onTag?: TagTransformer;
    /**
     * Modify the mustache block before it is being processed by the parser
     */
    onMustache?: MustacheTransformer;
    /**
     * Claim un-registered tags
     */
    claimTag?: ClaimTagFn;
    /**
     * Nested or flat path to the escape method for escaping values.
     */
    escapeCallPath: string | [string, string];
    /**
     * Name of the property to be used for accessing the values from
     * the template. Leave it to an empty string, if properties
     * are available directly (meaning without a subpath).
     */
    statePropertyName: string;
    /**
     * An array of local variables to be accessible directly. Define these
     * so that the parser doesn't access them from the state property.
     */
    localVariables?: string[];
};
