import type { FunctionDecl, VariableDecl, VariableDeclList } from "./declaration";
import { Expr, FunctionExpr, Identifier } from "./expression";
import { BaseNode, FunctionlessNode } from "./node";
import { NodeKind } from "./node-kind";
import { Span } from "./span";
/**
 * A {@link Stmt} (Statement) is unit of execution that does not yield any value. They are translated
 * to `#set`, `$util.qr` and `#return` directives.
 */
export declare type Stmt = BreakStmt | BlockStmt | CatchClause | ContinueStmt | DebuggerStmt | DoStmt | EmptyStmt | ExprStmt | ForInStmt | ForOfStmt | ForStmt | IfStmt | LabelledStmt | ReturnStmt | SwitchStmt | SwitchClause | ThrowStmt | TryStmt | VariableStmt | WhileStmt | WithStmt;
export declare abstract class BaseStmt<Kind extends NodeKind, Parent extends FunctionlessNode | undefined = BlockStmt | IfStmt> extends BaseNode<Kind, Parent> {
    readonly nodeKind: "Stmt";
    /**
     * Node that is prior to this node.
     */
    prev: Stmt | undefined;
    /**
     * Node that is subsequent to this node.
     */
    next: Stmt | undefined;
}
export declare class ExprStmt extends BaseStmt<NodeKind.ExprStmt> {
    readonly expr: Expr;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr);
}
export declare class VariableStmt extends BaseStmt<NodeKind.VariableStmt> {
    readonly declList: VariableDeclList;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, declList: VariableDeclList);
}
export declare type BlockStmtParent = CatchClause | DoStmt | ForInStmt | ForOfStmt | ForStmt | FunctionDecl | FunctionExpr | IfStmt | TryStmt | WhileStmt;
export declare class BlockStmt extends BaseStmt<NodeKind.BlockStmt, BlockStmtParent> {
    readonly statements: Stmt[];
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, statements: Stmt[]);
    isFinallyBlock(): this is FinallyBlock;
    isEmpty(): this is {
        readonly statements: [];
    };
    isNotEmpty(): this is {
        readonly statements: [Stmt, ...Stmt[]];
    };
    get firstStmt(): Stmt | undefined;
    get lastStmt(): Stmt | undefined;
}
export declare class ReturnStmt extends BaseStmt<NodeKind.ReturnStmt> {
    readonly expr: Expr | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr | undefined);
}
export declare class IfStmt extends BaseStmt<NodeKind.IfStmt> {
    readonly when: Expr;
    readonly then: Stmt;
    readonly _else?: Stmt | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, when: Expr, then: Stmt, _else?: Stmt | undefined);
}
export declare class ForOfStmt extends BaseStmt<NodeKind.ForOfStmt> {
    readonly initializer: VariableDecl | Identifier;
    readonly expr: Expr;
    readonly body: BlockStmt;
    /**
     * Whether this is a for-await-of statement
     * ```ts
     * for await (const a of b) { .. }
     * ```
     */
    readonly isAwait: boolean;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, initializer: VariableDecl | Identifier, expr: Expr, body: BlockStmt, 
    /**
     * Whether this is a for-await-of statement
     * ```ts
     * for await (const a of b) { .. }
     * ```
     */
    isAwait: boolean);
}
export declare class ForInStmt extends BaseStmt<NodeKind.ForInStmt> {
    readonly initializer: VariableDecl | Identifier;
    readonly expr: Expr;
    readonly body: BlockStmt;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, initializer: VariableDecl | Identifier, expr: Expr, body: BlockStmt);
}
export declare class ForStmt extends BaseStmt<NodeKind.ForStmt> {
    readonly body: BlockStmt;
    readonly initializer?: Expr | VariableDeclList | undefined;
    readonly condition?: Expr | undefined;
    readonly incrementor?: Expr | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, body: BlockStmt, initializer?: Expr | VariableDeclList | undefined, condition?: Expr | undefined, incrementor?: Expr | undefined);
}
export declare class BreakStmt extends BaseStmt<NodeKind.BreakStmt> {
    readonly label?: Identifier | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, label?: Identifier | undefined);
}
export declare class ContinueStmt extends BaseStmt<NodeKind.ContinueStmt> {
    readonly label?: Identifier | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, label?: Identifier | undefined);
}
export interface FinallyBlock extends BlockStmt {
    parent: TryStmt & {
        finallyBlock: FinallyBlock;
    };
}
export declare class TryStmt extends BaseStmt<NodeKind.TryStmt> {
    readonly tryBlock: BlockStmt;
    readonly catchClause?: CatchClause | undefined;
    readonly finallyBlock?: FinallyBlock | undefined;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, tryBlock: BlockStmt, catchClause?: CatchClause | undefined, finallyBlock?: FinallyBlock | undefined);
}
export declare class CatchClause extends BaseStmt<NodeKind.CatchClause, TryStmt> {
    readonly variableDecl: VariableDecl | undefined;
    readonly block: BlockStmt;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, variableDecl: VariableDecl | undefined, block: BlockStmt);
}
export declare class ThrowStmt extends BaseStmt<NodeKind.ThrowStmt> {
    readonly expr: Expr;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr);
}
export declare class WhileStmt extends BaseStmt<NodeKind.WhileStmt> {
    readonly condition: Expr;
    readonly block: BlockStmt;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, condition: Expr, block: BlockStmt);
}
export declare class DoStmt extends BaseStmt<NodeKind.DoStmt> {
    readonly block: BlockStmt;
    readonly condition: Expr;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, block: BlockStmt, condition: Expr);
}
export declare class LabelledStmt extends BaseStmt<NodeKind.LabelledStmt> {
    readonly label: Identifier;
    readonly stmt: Stmt;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, label: Identifier, stmt: Stmt);
}
export declare class DebuggerStmt extends BaseStmt<NodeKind.DebuggerStmt> {
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span);
}
export declare class SwitchStmt extends BaseStmt<NodeKind.SwitchStmt> {
    readonly expr: Expr;
    readonly clauses: SwitchClause[];
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr, clauses: SwitchClause[]);
}
export declare type SwitchClause = CaseClause | DefaultClause;
export declare class CaseClause extends BaseStmt<NodeKind.CaseClause> {
    readonly expr: Expr;
    readonly statements: Stmt[];
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr, statements: Stmt[]);
}
export declare class DefaultClause extends BaseStmt<NodeKind.DefaultClause> {
    readonly statements: Stmt[];
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, statements: Stmt[]);
}
export declare class EmptyStmt extends BaseStmt<NodeKind.EmptyStmt> {
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span);
}
export declare class WithStmt extends BaseStmt<NodeKind.WithStmt> {
    readonly expr: Expr;
    readonly stmt: Stmt;
    constructor(
    /**
     * Range of text in the source file where this Node resides.
     */
    span: Span, expr: Expr, stmt: Stmt);
}
export declare const deploymentOnlyModule = true;
//# sourceMappingURL=statement.d.ts.map