Skip to main content

MAX_GROUP_DEPTH

Constant MAX_GROUP_DEPTH 

Source
pub const MAX_GROUP_DEPTH: usize = 8;
Expand description

Maximum group nesting the parser accepts.

Deeper than this is a generated-JSON accident rather than an authored control-flow shape, and the bound keeps the per-task group_starts vector trivially small.

Public so a host validating authored JSON reads the engine’s real limit instead of copying the number. Depth counts enclosing groups: a top-level group is at depth 0, so groups are accepted at depths 0..MAX_GROUP_DEPTH and a group at MAX_GROUP_DEPTH is rejected by the parser and reported as StepKind::TooDeep by the walker.