1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! # Cellang Parser Facade API Contract
//!
//! ## Canonical API Contract
//!
//! The following functions define the **canonical** parser facade surface:
//!
//! | **Stage** | **Canonical Path** | **Function Signature** | **Description** |
//! |-------------------|---------------------------------|---------------------------------------------------------------------------|----------------------------------------------------------|
//! | Parse | `cellang::parser::parse` | `fn parse(input: &str) -> Result<ParseResult, Error>` | Parse source text into Rowan CST (concrete syntax tree) |
//! | Lower to HIR | `cellang::parser::lower` | `fn lower(parse_result: &ParseResult) -> Result<Expr, LowerError>` | Lower CST to HIR (high-level intermediate representation)|
//! | Lower from source | `cellang::parser::lower_source` | `fn lower_source(source: &str) -> Result<Expr, LowerError>` | Parse + lower in one step |
//! | Type-check | `cellang::parser::type_check` | `fn type_check(env: &Env, expr: &Expr) -> Result<TypedExpr, RuntimeError>` | Type-check HIR expression against environment |
//! | Eval from source | `cellang::parser::eval` | `fn eval(runtime: &Runtime, source: &str) -> Result<Value, RuntimeError>`| Parse, lower, type-check, and evaluate source string |
//! | Eval HIR AST | `cellang::parser::eval_ast` | `fn eval_ast(runtime: &Runtime, expr: &Expr) -> Result<Value, RuntimeError>` | Evaluate HIR expression directly |
/// Canonical parser facade providing intuitive access to the full parsing pipeline.
///
/// This module re-exports the complete parse → lower → type-check → eval pipeline
/// as a unified API surface.
///
/// ## Pipeline Overview
///
/// The CEL parsing pipeline consists of these stages:
///
/// 1. **Parse** ([`parse`]) - Tokenize and build concrete syntax tree (CST)
/// 2. **Lower** ([`lower`], [`lower_source`]) - Convert CST to high-level IR (HIR)
/// 3. **Type-check** ([`type_check`]) - Validate types and build typed expression
/// 4. **Evaluate** ([`eval`], [`eval_ast`]) - Execute the expression
///
/// ## Quick Start
///
/// ```rust
/// use cellang::parser::{eval, lower_source};
/// use cellang::Runtime;
///
/// // Direct evaluation (parse + lower + type-check + eval in one step)
/// let runtime = Runtime::builder().build();
/// let result = eval(&runtime, "1 + 2").unwrap();
///
/// // Manual pipeline control (parse and lower separately)
/// let hir_expr = lower_source("users.size() > 0").unwrap();
/// // ... inspect or transform HIR before evaluation
/// ```
/// Syntax-tree inspection helpers for IDE/LSP and analysis tooling.
pub use crateSyntaxKind;
pub use crate*;
pub use CelType;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use CelStruct;