Skip to main content

max_parse_recursion

Function max_parse_recursion 

Source
pub fn max_parse_recursion() -> usize
Expand description

The parse-time recursion budget: a quarter of the AST limit (min the floor).

The parser’s own descent is BY FAR the fattest stack consumer — each parenthesis level re-enters the whole precedence/condition chain, measured at ~32 KiB per level in debug builds — so it gets a much tighter budget than the built-tree limit (32 levels of parens at the default, deeper than any sane expression). Scales with LOGOS_MAX_AST_DEPTH like everything else, so deep-stack machines can raise both together.