Skip to content

ParserOptions

ParserOptions mirrors the behavior flags from cel-go’s parser options.

enableHiddenAccumulatorName: boolean

Chooses the hidden accumulator identifier used by comprehensions.


enableIdentEscapeSyntax: boolean

Enables backtick-escaped identifiers.


enableOptionalSyntax: boolean

Enables optional select, index, and initializer syntax.


enableStandardMacros: boolean

Controls whether the standard parser macros are registered.


enableVariadicOperatorASTs: boolean

Emits compact logical operator calls for like-kind chains.


errorRecoveryLimit: number

Limits how many parser recovery attempts may occur before bailing out.


errorRecoveryTokenLookaheadLimit: number

Limits how far parser recovery may scan ahead for a viable token.


errorReportingLimit: number

Limits the number of syntax errors reported for a single parse.


expressionSizeCodePointLimit: number

Limits the source size measured in Unicode code points.


macros: Map<string, Macro>

Registers parser macros by signature.


maxExpressionNodeCount: number

Limits the number of expression nodes emitted by parsing and macro expansion.


maxRecursionDepth: number

Limits recursive descent depth while parsing nested expressions.


populateMacroCalls: boolean

Preserves original macro call shapes in source info.