Split unit into duration and filesize (#3453)

This commit is contained in:
JT
2021-05-21 13:21:46 +12:00
committed by GitHub
parent 4fdbf30308
commit 28388b4e3a
6 changed files with 126 additions and 38 deletions

View File

@ -26,8 +26,10 @@ pub enum SyntaxShape {
Block,
/// A table is allowed, eg `[first second]`
Table,
/// A unit value is allowed, eg `10kb`
Unit,
/// A filesize value is allowed, eg `10kb`
Filesize,
/// A duration value is allowed, eg `19day`
Duration,
/// An operator
Operator,
/// A math expression which expands shorthand forms on the lefthand side, eg `foo > 1`
@ -52,7 +54,8 @@ impl PrettyDebug for SyntaxShape {
SyntaxShape::GlobPattern => "pattern",
SyntaxShape::Block => "block",
SyntaxShape::Table => "table",
SyntaxShape::Unit => "unit",
SyntaxShape::Duration => "duration",
SyntaxShape::Filesize => "filesize",
SyntaxShape::Operator => "operator",
SyntaxShape::RowCondition => "condition",
SyntaxShape::MathExpression => "math expression",