ExpressionNestingDepthLimit records the maximum nesting depth permitted for ASTs in the environment configuration so that the value round-trips through env.Config export/import. ASTs loaded outside the parser (e.g. via ParsedExprToAst / CheckedExprToAst) bypass the parser's recursion limit, so thos
(limit int)
| 1019 | // Embedders that fully control their AST inputs and want to skip the check can construct the AST |
| 1020 | // through the common/ast package directly rather than the cel conversion helpers. |
| 1021 | func ExpressionNestingDepthLimit(limit int) EnvOption { |
| 1022 | return setLimit(limitMaxASTDepth, limit) |
| 1023 | } |
| 1024 | |
| 1025 | // EnableHiddenAccumulatorName sets the parser to use the identifier '@result' for accumulators |
| 1026 | // which is not normally accessible from CEL source. |