Skip to main content

formula_dsl

Function formula_dsl 

Source
fn formula_dsl(model: &Model, formula: &Formula) -> Option<String>
Expand description

Render formula as symbolic-DSL source text that parser::parse_expr parses back to the identical AST, or None when the v1 grammar has no exact spelling for the shape (a bare ref carrying over/except, a multi-category OVER, an empty measure/category name, an enum/error/negative/exponent literal, an unknown function id). Callers fall back to the controlled-English description for those, which commit_formula also accepts.

Awkward names are no longer a refusal reason: ident quotes them ('Unit Price', 'Price/Unit', 'Over') per plan Step 4b.