import { Token } from './token'; import { Expr } from './ast'; export declare class ControlFlowSignal { type: 'break' | 'continue' | 'return'; value?: any; constructor(type: 'break' | 'continue' | 'return', value?: any); } export interface Stmt { execute(interpreter: any): any; hasSemicolon?: boolean; type?: string; } export declare class ExprStmt implements Stmt { expr: Expr; readonly type = "ExprStmt"; hasSemicolon: boolean; constructor(expr: Expr, hasSemicolon?: boolean); execute(interpreter: any): any; } export declare class LetStmt implements Stmt { name: Token; initializer: Expr; readonly type = "LetStmt"; constructor(name: Token, initializer: Expr); execute(interpreter: any): any; } export declare class IfStmt implements Stmt { condition: Expr; thenBranch: Stmt[]; elsifBranches: Array<{ condition: Expr; body: Stmt[]; }>; elseBranch: Stmt[] | null; readonly type = "IfStmt"; constructor(condition: Expr, thenBranch: Stmt[], elsifBranches: Array<{ condition: Expr; body: Stmt[]; }>, elseBranch: Stmt[] | null); execute(interpreter: any): any; } export declare class WhileStmt implements Stmt { condition: Expr; body: Stmt[]; readonly type = "WhileStmt"; constructor(condition: Expr, body: Stmt[]); execute(interpreter: any): any; } export declare class ForStmt implements Stmt { indexVar: Token | null; itemVar: Token; iterable: Expr; body: Stmt[]; readonly type = "ForStmt"; constructor(indexVar: Token | null, // optional index/key variable itemVar: Token, iterable: Expr, body: Stmt[]); execute(interpreter: any): any; } export declare class FnStmt implements Stmt { name: Token; params: Token[]; body: Stmt[]; readonly type = "FnStmt"; constructor(name: Token, params: Token[], body: Stmt[]); execute(interpreter: any): any; } export declare class ReturnStmt implements Stmt { value: Expr | null; readonly type = "ReturnStmt"; constructor(value: Expr | null); execute(interpreter: any): any; } export declare class BreakStmt implements Stmt { readonly type = "BreakStmt"; execute(interpreter: any): any; } export declare class ContinueStmt implements Stmt { readonly type = "ContinueStmt"; execute(interpreter: any): any; } export declare class BlockStmt implements Stmt { statements: Stmt[]; readonly type = "BlockStmt"; constructor(statements: Stmt[]); execute(interpreter: any): any; } export declare class ThrowStmt implements Stmt { value: Expr; readonly type = "ThrowStmt"; constructor(value: Expr); execute(interpreter: any): any; } export declare class TryStmt implements Stmt { tryBlock: Stmt[]; catchVar: Token | null; catchBlock: Stmt[] | null; finallyBlock: Stmt[] | null; readonly type = "TryStmt"; constructor(tryBlock: Stmt[], catchVar: Token | null, catchBlock: Stmt[] | null, finallyBlock: Stmt[] | null); execute(interpreter: any): any; } //# sourceMappingURL=statement.d.ts.map