import { Type } from "@angular/core";
declare class Token {
    type: number;
    value: any;
    line?: number;
    col?: number;
    constructor(type: number, value: any, line?: number, col?: number);
    static from(type: number, value: any): Token;
    toString(): string;
}
/**
 * Parser
 */
declare abstract class AST {
    line?: number;
    col?: number;
    constructor(line?: number, col?: number);
    dump(): string;
}
declare class RootAST extends AST {
    body: AST[];
    source: string;
    name: string;
    constructor(body: AST[], name: string, source: string);
    dump(): string;
}
declare class BlockStatementAST extends AST {
    body: AST[];
    constructor(body: AST[], token: Token);
    toString(): string;
}
declare class IdentifierAST extends AST {
    value: string;
    constructor(token: Token);
    toString(): string;
}
declare class LiteralAST extends AST {
    value: any;
    raw: string;
    constructor(token: Token, raw: string);
    toString(): string;
}
declare class AssignmentExpressionAST extends AST {
    identifier: IdentifierAST;
    init: AST;
    constructor(identifier: IdentifierAST, init: AST);
    toString(): string;
}
declare class ExpressionStatementAST extends AST {
    expression: AST;
    constructor(expression: AST);
    toString(): string;
}
declare class CallExpressionAST extends AST {
    callee: IdentifierAST;
    arguments: AST[];
    constructor(callee: IdentifierAST, ags: AST[]);
    toString(): string;
}
declare class BinaryExpressionAST extends AST {
    left: AST;
    operation: Token;
    right: AST;
    constructor(left: AST, operation: Token, right: AST);
    toString(): string;
}
declare class UnaryExpressionAST extends AST {
    operation: Token;
    argument: AST;
    constructor(operation: Token, argument: AST);
    toString(): string;
}
declare class IfStatementAST extends AST {
    test: AST;
    consequent: AST;
    alternate?: AST;
    constructor(test: AST, consequent: AST, alternate?: AST);
    toString(): string;
}
declare class LogicalExpressionAST extends AST {
    left: AST;
    operator: Token;
    right: AST;
    constructor(left: AST, operator: Token, right: AST);
    toString(): string;
}
declare class IndexAccessorAST extends AST {
    owner: AST;
    key: AST;
    constructor(owner: AST, key: AST);
    toString(): string;
}
declare type Func = (node: any) => any;
declare abstract class ANodeVisitor {
    protected _nodesVisitors: {
        [k: string]: Func;
    };
    protected registerVisitor(type: Type<AST>, visitor: Func): void;
    abstract visit(node: AST): any;
}
declare abstract class NodeVisitor extends ANodeVisitor {
    visit(node: AST): any;
}
declare type MEventoFBinding = (args: any[]) => any;
export declare class MEvento extends NodeVisitor {
    _memory: {
        [k: string]: any;
    };
    private static _globalFunctionsRegistry;
    private static _cache;
    _functionsRegistry: {
        [k: string]: MEventoFBinding;
    };
    constructor();
    protected visitRootAST(node: RootAST): any;
    protected visitBlockStatementAST(node: BlockStatementAST): any;
    protected visitIdentifierAST(node: IdentifierAST): any;
    protected visitLiteralAST(node: AST): any;
    protected visitAssignmentExpressionAST(node: AssignmentExpressionAST): any;
    protected visitExpressionStatementAST(node: ExpressionStatementAST): any;
    protected visitCallExpressionAST(node: CallExpressionAST): any;
    protected visitBinaryExpressionAST(node: BinaryExpressionAST): any;
    protected visitUnaryExpressionAST(node: UnaryExpressionAST): any;
    protected visitIfStatementAST(node: IfStatementAST): any;
    protected visitLogicalExpressionAST(node: LogicalExpressionAST): any;
    protected visitIndexAccessorAST(node: IndexAccessorAST): any;
    registerFunction(id: string, fn: MEventoFBinding): void;
    unregisterFunction(id: string): void;
    execute(source: string, cache?: boolean): any;
    static compile(source: string, cache?: boolean): AST;
    static register(id: string, fn: MEventoFBinding): void;
    static unregister(id: string): void;
    static run(source: string, cache?: boolean): any;
    static newInstance(): MEvento;
}
export declare class MEventoAsync extends MEvento {
    constructor();
    protected visitRootAST(node: RootAST): Promise<any>;
    protected visitBlockStatementAST(node: BlockStatementAST): Promise<any>;
    protected visitIdentifierAST(node: AST): Promise<any>;
    protected visitLiteralAST(node: LiteralAST): Promise<any>;
    protected visitAssignmentExpressionAST(node: AssignmentExpressionAST): Promise<any>;
    protected visitExpressionStatementAST(node: ExpressionStatementAST): Promise<any>;
    protected visitCallExpressionAST(node: CallExpressionAST): Promise<any>;
    protected visitBinaryExpressionAST(node: BinaryExpressionAST): Promise<any>;
    protected visitUnaryExpressionAST(node: UnaryExpressionAST): Promise<any>;
    protected visitIfStatementAST(node: IfStatementAST): Promise<any>;
    protected visitLogicalExpressionAST(node: LogicalExpressionAST): Promise<boolean>;
    protected visitIndexAccessorAST(node: IndexAccessorAST): Promise<any>;
    registerFunction(id: string, fn: MEventoFBinding): void;
    unregisterFunction(id: string): void;
    execute(source: string, cache?: boolean): Promise<any>;
    static run(source: string, cache?: boolean): Promise<any>;
    static newInstance(): MEventoAsync;
}
export {};
