Implement get and tap functions.
This commit is contained in:
@@ -41,6 +41,9 @@ pub enum DustTag<'a> {
|
||||
DTHelperLessThan(ParameterizedBlock<'a>),
|
||||
DTHelperGreaterThanOrEquals(ParameterizedBlock<'a>),
|
||||
DTHelperLessThanOrEquals(ParameterizedBlock<'a>),
|
||||
DTHelperSep(ParameterizedBlock<'a>),
|
||||
DTHelperFirst(ParameterizedBlock<'a>),
|
||||
DTHelperLast(ParameterizedBlock<'a>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
@@ -240,6 +243,18 @@ fn dust_tag(i: &str) -> IResult<&str, DustTag> {
|
||||
parameterized_block("{@", &tag_to_path("lt")),
|
||||
DustTag::DTHelperLessThan,
|
||||
),
|
||||
map(
|
||||
parameterized_block("{@", &tag_to_path("sep")),
|
||||
DustTag::DTHelperSep,
|
||||
),
|
||||
map(
|
||||
parameterized_block("{@", &tag_to_path("first")),
|
||||
DustTag::DTHelperFirst,
|
||||
),
|
||||
map(
|
||||
parameterized_block("{@", &tag_to_path("last")),
|
||||
DustTag::DTHelperLast,
|
||||
),
|
||||
))(i)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user