Skip to main content

MAX_NESTING_DEPTH

Constant MAX_NESTING_DEPTH 

Source
pub const MAX_NESTING_DEPTH: u32 = 500;
Expand description

ADR-0257: maximum nesting depth accepted while parsing. Enforced on expression nesting (every nested expression – parenthesized constructs, list/map literals, function-call arguments, subqueries, … – descends through [Parser::parse_expression]; NOT chains recurse through [Parser::parse_not]) and on statement nesting (subquery bodies). Recursive-descent parsing beyond this depth risks a stack-overflow abort, which – when the engine is embedded via the C ABI – kills the host process instead of surfacing a recoverable error (LABS-69). The front-end lowering boundary enforces the same limit on its own walkers.