pub fn parse_template_expr(content: &str) -> Result<TemplateExpr, NikaError>Expand description
Parse the content inside {{ ... }} into a TemplateExpr.
Grammar:
expr := "context." path → Context
| "inputs." path → Input
| "with." alias_path ("|" t)* → Alias (with. prefix stripped)
| alias_path ("|" transform)* → AliasThis replaces the buggy negative-lookahead regex approach:
- No negative lookahead bugs — exact
strip_prefix("context.")is unambiguous - Arbitrary transform chains —
split('|')handles any number of pipes - Better error messages — parser can report exactly what’s wrong
- Simpler to maintain — no complex regex to debug