Compare range type.

This commit is contained in:
Tom Alexander
2023-10-02 13:42:46 -04:00
parent d04c8c832c
commit 3ed9b552e2
4 changed files with 30 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ use crate::context::RefContext;
use crate::error::Res;
use crate::parser::util::get_consumed;
use crate::types::Timestamp;
use crate::types::TimestampRangeType;
use crate::types::TimestampType;
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
@@ -59,6 +60,7 @@ fn diary_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::Diary,
range_type: TimestampRangeType::None,
},
))
}
@@ -124,6 +126,7 @@ fn active_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::Active,
range_type: TimestampRangeType::None,
},
))
}
@@ -159,6 +162,7 @@ fn inactive_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::Inactive,
range_type: TimestampRangeType::None,
},
))
}
@@ -182,6 +186,7 @@ fn active_date_range_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::ActiveRange,
range_type: TimestampRangeType::DateRange,
},
))
}
@@ -224,6 +229,7 @@ fn active_time_range_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::Active,
range_type: TimestampRangeType::None,
},
))
}
@@ -248,6 +254,7 @@ fn inactive_date_range_timestamp<'b, 'g, 'r, 's>(
source: source.into(),
timestamp_type: TimestampType::InactiveRange,
range_type: TimestampRangeType::DateRange,
},
))
}
@@ -290,6 +297,7 @@ fn inactive_time_range_timestamp<'b, 'g, 'r, 's>(
Timestamp {
source: source.into(),
timestamp_type: TimestampType::Inactive,
range_type: TimestampRangeType::None,
},
))
}