import * as es from 'estree';
import { Environment, Node } from '../types';
import Closure from './closure';
import { SchemeControlItems } from './scheme-macros';
import { Transformers } from './interpreter';
export declare enum InstrType {
    RESET = "Reset",
    WHILE = "While",
    FOR = "For",
    ASSIGNMENT = "Assignment",
    UNARY_OP = "UnaryOperation",
    BINARY_OP = "BinaryOperation",
    POP = "Pop",
    APPLICATION = "Application",
    BRANCH = "Branch",
    ENVIRONMENT = "Environment",
    ARRAY_LITERAL = "ArrayLiteral",
    ARRAY_ACCESS = "ArrayAccess",
    ARRAY_ASSIGNMENT = "ArrayAssignment",
    ARRAY_LENGTH = "ArrayLength",
    MARKER = "Marker",
    CONTINUE = "Continue",
    CONTINUE_MARKER = "ContinueMarker",
    BREAK = "Break",
    BREAK_MARKER = "BreakMarker",
    SPREAD = "Spread"
}
interface BaseInstr {
    instrType: InstrType;
    srcNode: Node;
    isEnvDependent?: boolean;
}
export interface WhileInstr extends BaseInstr {
    test: es.Expression;
    body: es.Statement;
}
export interface ForInstr extends BaseInstr {
    init: es.VariableDeclaration | es.Expression;
    test: es.Expression;
    update: es.Expression;
    body: es.Statement;
}
export interface AssmtInstr extends BaseInstr {
    symbol: string;
    constant: boolean;
    declaration: boolean;
}
export interface UnOpInstr extends BaseInstr {
    symbol: es.UnaryOperator;
}
export interface BinOpInstr extends BaseInstr {
    symbol: es.BinaryOperator;
}
export interface AppInstr extends BaseInstr {
    numOfArgs: number;
    srcNode: es.CallExpression;
}
export interface BranchInstr extends BaseInstr {
    consequent: es.Expression | es.Statement;
    alternate: es.Expression | es.Statement | null | undefined;
}
export interface EnvInstr extends BaseInstr {
    env: Environment;
    transformers: Transformers;
}
export interface ArrLitInstr extends BaseInstr {
    arity: number;
}
export interface SpreadInstr extends BaseInstr {
    symbol: es.SpreadElement;
}
export type Instr = BaseInstr | WhileInstr | AssmtInstr | AppInstr | BranchInstr | EnvInstr | ArrLitInstr | SpreadInstr;
export type ControlItem = (Node | Instr | SchemeControlItems) & {
    isEnvDependent?: boolean;
};
export type EnvArray = any[] & {
    readonly id: string;
    environment: Environment;
};
export type HeapObject = EnvArray | Closure;
export declare class CSEBreak {
}
export declare class CseError {
    readonly error: any;
    constructor(error: any);
}
export {};
