import type { ArithResult, ElementOps } from './types.ts'; /** * Evaluate a bash arithmetic expression. * * Implements bash's arithmetic grammar over 64-bit wrapping integers * (BigInt): comma sequences, assignment operators, the ternary, * short-circuit `&&`/`||`, bitwise/relational/shift/additive/ * multiplicative operators, right-associative `**`, unary operators, and * prefix/postfix `++`/`--`. BigInt division/modulo already truncate * toward zero like C. A variable whose value is not a plain integer * literal is evaluated recursively like bash (`x="1+2"; $((x))` is 3). * `base#value` literals are not supported. Element references (`a[i]`, * `m[key]`) resolve and assign through `elements`; with null every * subscript is a syntax error, which is what an evaluation with no * session behind it can honestly say. Returns the value plus the scalar * and element assignments made, for the caller to apply to the session. * Throws ArithError on syntax errors, division by zero, or a negative * exponent. */ export declare function evaluateArith(expr: string, env: Readonly>, depth?: number, elements?: ElementOps | null): ArithResult; //# sourceMappingURL=arith.d.ts.map