/**
 * IR Builder
 *
 * Fluent API for constructing IR nodes
 */
import type { IRType, IRExpr, IRVariable, IRBlock, IRInstruction, IRTerminator, IRParam, BinaryOp, UnaryOp, IRStatement, IRExpression, IRFunctionBody } from './types.js';
import { PrimitiveType, Ownership } from './types.js';
/**
 * Fluent builder for IR construction
 */
export declare class IRBuilder {
    private blockCounter;
    private variableVersions;
    /**
     * Create a new basic block
     */
    block(instructions: IRInstruction[], terminator: IRTerminator): IRBlock;
    /**
     * Create a function body (AST-level statements)
     */
    functionBody(statements: IRStatement[]): IRFunctionBody;
    /**
     * Create a new SSA variable version
     */
    variable(name: string, type: IRType): IRVariable;
    /**
     * Reset variable versions (for new function scope)
     */
    resetVersions(): void;
}
export declare const types: {
    primitive(type: PrimitiveType): IRType;
    number(): IRType;
    integer(): IRType;
    integer53(): IRType;
    string(): IRType;
    boolean(): IRType;
    void(): IRType;
    class(name: string, ownership: Ownership, typeArgs?: IRType[]): IRType;
    array(element: IRType, ownership?: Ownership): IRType;
    map(key: IRType, value: IRType, ownership?: Ownership): IRType;
    promise(resultType: IRType): IRType;
    nullable(inner: IRType): IRType;
    union(types: IRType[]): IRType;
    intersection(types: IRType[]): IRType;
    typeAlias(name: string, aliasedType: IRType): IRType;
    function(params: IRType[], returnType: IRType): IRType;
    struct(fields: Array<{
        name: string;
        type: IRType;
    }>, ownership?: Ownership): IRType;
};
export declare const expr: {
    literal(value: number | string | boolean | null, type: IRType): IRExpr;
    binary(op: BinaryOp, left: IRExpr, right: IRExpr, type: IRType): IRExpr;
    unary(op: UnaryOp, operand: IRExpr, type: IRType): IRExpr;
    conditional(condition: IRExpr, whenTrue: IRExpr, whenFalse: IRExpr, type: IRType): IRExpr;
    member(object: IRExpr, member: string, type: IRType): IRExpr;
    index(object: IRExpr, index: IRExpr, type: IRType): IRExpr;
    call(callee: IRExpr, args: IRExpr[], type: IRType): IRExpr;
    methodCall(object: IRExpr, method: string, args: IRExpr[], type: IRType): IRExpr;
    "new"(className: string, args: IRExpr[], type: IRType): IRExpr;
    array(elements: IRExpr[], type: IRType): IRExpr;
    object(properties: Array<{
        key: string;
        value: IRExpr;
    }>, type: IRType): IRExpr;
    lambda(params: IRParam[], body: IRBlock, captures: Array<{
        name: string;
        type: IRType;
    }>, type: IRType): IRExpr;
    move(source: IRExpr, type: IRType): IRExpr;
    borrow(source: IRExpr, type: IRType): IRExpr;
    variable(name: string, version: number, type: IRType): IRExpr;
    fieldAccess(object: IRExpr, field: string, type: IRType, optional?: boolean): IRExpr;
};
/**
 * Expression builders (for AST-level IR)
 */
export declare const exprs: {
    literal(value: number | string | boolean | null, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    identifier(name: string, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    binary(operator: BinaryOp, left: IRExpression, right: IRExpression, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    unary(operator: UnaryOp, operand: IRExpression, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    call(callee: IRExpression, args: IRExpression[], type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    memberAccess(object: IRExpression, member: string, type: IRType, optional?: boolean, location?: {
        line: number;
        column: number;
    }): IRExpression;
    indexAccess(object: IRExpression, index: IRExpression, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    assignment(left: IRExpression, right: IRExpression, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    arrayLiteral(elements: IRExpression[], type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
    objectLiteral(properties: Array<{
        key: string;
        value: IRExpression;
    }>, type: IRType, location?: {
        line: number;
        column: number;
    }): IRExpression;
};
/**
 * Statement builders (for AST-level IR)
 */
export declare const stmts: {
    variableDeclaration(name: string, variableType: IRType, initializer?: IRExpression, location?: {
        line: number;
        column: number;
    }): IRStatement;
    return(value?: IRExpression, location?: {
        line: number;
        column: number;
    }): IRStatement;
    expressionStatement(expression: IRExpression, location?: {
        line: number;
        column: number;
    }): IRStatement;
    if(condition: IRExpression, thenBranch: IRStatement[], elseBranch?: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    while(condition: IRExpression, body: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    for(initializer: IRStatement | undefined, condition: IRExpression | undefined, increment: IRExpression | undefined, body: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    block(statements: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    try(tryBlock: IRStatement[], catchClause?: {
        variable: string;
        variableType: IRType;
        body: IRStatement[];
    }, finallyBlock?: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    throw(expression: IRExpression, location?: {
        line: number;
        column: number;
    }): IRStatement;
    forOf(variable: string, variableType: IRType, iterable: IRExpression, body: IRStatement[], location?: {
        line: number;
        column: number;
    }): IRStatement;
    break(location?: {
        line: number;
        column: number;
    }): IRStatement;
    continue(location?: {
        line: number;
        column: number;
    }): IRStatement;
};
//# sourceMappingURL=builder.d.ts.map