Add eval representation of DateSpec

This commit is contained in:
Joscha 2021-11-26 00:53:27 +01:00
parent e827556c84
commit 1d80ab681e
3 changed files with 77 additions and 21 deletions

View file

@ -1,6 +1,8 @@
use crate::files::commands::{self, Expr, Time, Var};
use crate::files::commands::{self, DoneDate, Expr, Time, Var};
use crate::files::Source;
use super::delta::{Delta, DeltaStep};
use super::{Entry, Eval, Result};
pub struct FormulaSpec {
// TODO Implement more efficient exprs and expr evaluation
@ -66,3 +68,13 @@ impl From<&commands::WeekdaySpec> for FormulaSpec {
}
}
}
impl Eval {
pub fn eval_formula_spec(
&mut self,
spec: FormulaSpec,
new_entry: impl Fn(Source, Option<DoneDate>) -> Entry,
) -> Result<()> {
todo!()
}
}