import { AnythingConstructASTNode } from "../../../ast/ASTNode"; import { BlockASTNode, BreakStatementASTNode, ContinueStatementASTNode, DeclarationStatementASTNode, DoWhileStatementASTNode, ExpressionStatementASTNode, ForStatementASTNode, IfStatementASTNode, LabeledStatementASTNode, NullStatementASTNode, ReturnStatementASTNode, StatementASTNode, WhileStatementASTNode } from "../../../ast/ast_statements"; import { BlockContext } from "../../compilation/contexts"; import { RuntimeFunction } from "../../compilation/functions"; import { RuntimeConstruct } from "../CPPConstruct"; import { AnythingStatement } from "./AnythingStatement"; import { Block, CompiledBlock, RuntimeBlock } from "./Block"; import { BreakStatement, CompiledBreakStatement, RuntimeBreakStatement } from "./BreakStatement"; import { DeclarationStatement, CompiledDeclarationStatement, RuntimeDeclarationStatement } from "./DeclarationStatement"; import { ExpressionStatement, CompiledExpressionStatement, RuntimeExpressionStatement } from "./ExpressionStatement"; import { ForStatement, CompiledForStatement, RuntimeForStatement } from "./ForStatement"; import { IfStatement, CompiledIfStatement, RuntimeIfStatement } from "./IfStatement"; import { NullStatement, CompiledNullStatement, RuntimeNullStatement } from "./NullStatement"; import { ReturnStatement, CompiledReturnStatement, RuntimeReturnStatement } from "./ReturnStatement"; import { CompiledStatement, RuntimeStatement } from "./Statement"; import { UnsupportedStatement } from "./UnsupportedStatement"; import { WhileStatement, CompiledWhileStatement, RuntimeWhileStatement } from "./WhileStatement"; declare const StatementConstructsMap: { labeled_statement: (ast: LabeledStatementASTNode, context: BlockContext) => UnsupportedStatement; block: (ast: BlockASTNode, context: BlockContext) => Block; if_statement: (ast: IfStatementASTNode, context: BlockContext) => IfStatement; while_statement: (ast: WhileStatementASTNode, context: BlockContext) => WhileStatement; dowhile_statement: (ast: DoWhileStatementASTNode, context: BlockContext) => UnsupportedStatement; for_statement: (ast: ForStatementASTNode, context: BlockContext) => ForStatement; break_statement: (ast: BreakStatementASTNode, context: BlockContext) => BreakStatement; continue_statement: (ast: ContinueStatementASTNode, context: BlockContext) => UnsupportedStatement; return_statement: (ast: ReturnStatementASTNode, context: BlockContext) => ReturnStatement; declaration_statement: (ast: DeclarationStatementASTNode, context: BlockContext) => DeclarationStatement; expression_statement: (ast: ExpressionStatementASTNode, context: BlockContext) => ExpressionStatement; null_statement: (ast: NullStatementASTNode, context: BlockContext) => NullStatement; anything_construct: (ast: AnythingConstructASTNode, context: BlockContext) => AnythingStatement; }; export declare function createStatementFromAST(ast: ASTType, context: BlockContext): ReturnType<(typeof StatementConstructsMap)[ASTType["construct_type"]]>; export declare type CompiledStatementKinds = { "unsupported_statement": UnsupportedStatement; "block": CompiledBlock; "if_statement": CompiledIfStatement; "while_statement": CompiledWhileStatement; "for_statement": CompiledForStatement; "break_statement": CompiledBreakStatement; "return_statement": CompiledReturnStatement; "declaration_statement": CompiledDeclarationStatement; "expression_statement": CompiledExpressionStatement; "null_statement": CompiledNullStatement; }; export declare type AnalyticCompiledStatement = CompiledStatementKinds[C["construct_type"]]; declare const StatementConstructsRuntimeMap: { unsupported_statement: (construct: UnsupportedStatement, parent: RuntimeStatement) => never; block: (construct: CompiledBlock, parent: RuntimeStatement | RuntimeFunction) => RuntimeBlock; if_statement: (construct: CompiledIfStatement, parent: RuntimeStatement) => RuntimeIfStatement; while_statement: (construct: CompiledWhileStatement, parent: RuntimeStatement) => RuntimeWhileStatement; for_statement: (construct: CompiledForStatement, parent: RuntimeStatement) => RuntimeForStatement; break_statement: (construct: CompiledBreakStatement, parent: RuntimeStatement) => RuntimeBreakStatement; return_statement: (construct: CompiledReturnStatement, parent: RuntimeStatement) => RuntimeReturnStatement; declaration_statement: (construct: CompiledDeclarationStatement, parent: RuntimeStatement) => RuntimeDeclarationStatement; expression_statement: (construct: CompiledExpressionStatement, parent: RuntimeStatement) => RuntimeExpressionStatement; null_statement: (construct: CompiledNullStatement, parent: RuntimeStatement) => RuntimeNullStatement; }; export declare function createRuntimeStatement(construct: ConstructType, parent: RuntimeStatement | RuntimeFunction): ReturnType<(typeof StatementConstructsRuntimeMap)[ConstructType["construct_type"]]>; export declare function createRuntimeStatement>(construct: CompiledConstructType, parent: RuntimeConstruct): ReturnType<(typeof StatementConstructsRuntimeMap)[CompiledConstructType["construct_type"]]>; export declare function createRuntimeStatement(construct: CompiledStatement, parent: RuntimeConstruct): RuntimeStatement; export declare type AnalyticStatement = Block | IfStatement | WhileStatement | ForStatement | BreakStatement | ReturnStatement | DeclarationStatement | ExpressionStatement | NullStatement | UnsupportedStatement; export {};