Skip to main content

Module parser_context

Module parser_context 

Source
Expand description

ParserContext: the pluggable target a CEL grammar production emits into.

The recursive-descent grammar in lib.rs is generic over C: ParserContext so the same grammar can drive different backends without duplicating it. DynSegmentContext is the first implementation: it reproduces exactly what CELParser did before this trait existed, wrapping a [DynSegment] one-for-one. A future AST-building context (for the language server, formatter, and eventual macro-compilation backend) is expected to be the second.

Structs§

AnnotatedArray
Bundles the optional type-ascription inputs for array construction.
DynSegmentContext
ParserContext implementation that executes directly into a [DynSegment], reproducing the runtime-execution behavior CELParser always had before this trait existed.

Traits§

ParserContext
The pluggable target a grammar production emits into.