/** * Annotated Statement Execution * * Provides statement execution wrapper with annotation handling. * Annotations modify execution behavior (e.g., iteration limits). * * Interface requirements: * - executeStatement(stmt) -> Promise * - getAnnotation(key) -> RillValue | undefined * - getIterationLimit() -> number * * Error Handling: * - Annotated statement execution errors propagate * - Annotation evaluation errors propagate * * @internal */ import type { StatementNode, AnnotatedStatementNode, AnnotationArg } from '../../../../types.js'; import type { RillValue } from '../../types/structures.js'; import type { EvalState } from '../state.js'; /** * Execute statement with annotation handling. * * Handles both regular and annotated statements. * For annotated statements, evaluates annotations, pushes to stack, * executes inner statement, and pops annotations. * * Special: this is the executeStatement entry point. Its class-level * delegate stays a one-line call into this module function; it is never * inlined into eval/index.ts. */ export declare function executeStatement(s: EvalState, stmt: StatementNode | AnnotatedStatementNode): Promise; /** * Evaluate annotation arguments to a dict of key-value pairs. * Handles both named arguments and spread arguments. * * Errors during evaluation propagate. */ export declare function evaluateAnnotations(s: EvalState, annotations: AnnotationArg[]): Promise>; /** * Get the current value of an annotation from the annotation stack. * * Returns the value from the top of the annotation stack (innermost scope). */ export declare function getAnnotation(s: EvalState, key: string): RillValue | undefined; /** * Get the iteration limit for loops from operator-level annotations. * * Reads from the provided operator-level annotations dict when given. * Falls back to DEFAULT_MAX_ITERATIONS when no valid positive number is found. * Statement-level annotationStack is NOT consulted. * * @param operatorAnnotations - Evaluated operator-level annotations (from node.annotations) */ export declare function getIterationLimit(_s: EvalState, operatorAnnotations?: Record): number;