diff options
| author | tslil <tslil@posteo.de> | 2026-03-21 20:21:32 +0000 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-03-21 20:37:21 +0000 |
| commit | 139047379b2ff7751c1b5ef8e079ffc29cce752d (patch) | |
| tree | 268f05bb48cc0110a65202740ff763c3c133b9b0 /rprt-engine/src/expression.rs | |
| parent | 89d299376c97a3f866dccc15321713ce955d8125 (diff) | |
implement hooks, fix docs
Diffstat (limited to 'rprt-engine/src/expression.rs')
| -rw-r--r-- | rprt-engine/src/expression.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rprt-engine/src/expression.rs b/rprt-engine/src/expression.rs index 3bad172..195da80 100644 --- a/rprt-engine/src/expression.rs +++ b/rprt-engine/src/expression.rs @@ -15,8 +15,8 @@ pub enum Composite { Hook { kind: HookKind, - left: Box<Composite>, - right: Box<Composite>, + f: Box<Composite>, + g: Box<Composite>, }, Train2 { @@ -55,7 +55,7 @@ impl Display for Composite { TextFunction { func, swapped } => { write!(fmtr, "{}{func}", if *swapped { "@" } else { "" }) } - Hook { kind, left, right } => write!(fmtr, "({left}{kind}{right})"), + Hook { kind, f, g } => write!(fmtr, "({f}{kind}{g})"), Train2 { f, g } => write!(fmtr, "({f} {g})"), Train3 { f, g, h } => write!(fmtr, "({f} {g} {h})"), Group { operations } => { @@ -211,12 +211,12 @@ mod tests { }), h: Box::new(Composite::Hook { kind: HookKind::Before, - left: Box::new(Composite::SelectionFunction { + f: Box::new(Composite::SelectionFunction { func: BuiltinSelectionFn::Empty, result_transform: None, search_mod: None, }), - right: Box::new(Composite::TextFunction { + g: Box::new(Composite::TextFunction { func: BuiltinTextFn::Delete, swapped: false, }), |
