Make Expr::Interval its own struct (#872)

* Make Expr::Interval its own struct

* Add test interval display

* Fix cargo fmt
This commit is contained in:
Armin Primadi 2023-05-10 07:42:03 +07:00 committed by GitHub
parent b29b551fa1
commit f15da8772e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 116 additions and 77 deletions

View file

@ -1615,13 +1615,13 @@ impl<'a> Parser<'a> {
}
};
Ok(Expr::Interval {
Ok(Expr::Interval(Interval {
value: Box::new(value),
leading_field,
leading_precision,
last_field,
fractional_seconds_precision: fsec_precision,
})
}))
}
/// Parse an operator following an expression