Skip to main content

MAX_EXPRESSION_DEPTH

Constant MAX_EXPRESSION_DEPTH 

Source
pub const MAX_EXPRESSION_DEPTH: usize = 64;
Expand description

Maximum nesting depth of parentheses and ! operators.

ยงExamples

use ironflow_engine::expression::{Expression, ExpressionError, MAX_EXPRESSION_DEPTH};

let deep = format!(
    "{}payload.a{}",
    "(".repeat(MAX_EXPRESSION_DEPTH + 1),
    ")".repeat(MAX_EXPRESSION_DEPTH + 1)
);
assert_eq!(Expression::parse(&deep), Err(ExpressionError::TooDeep));