Remove the old partial implementation.

This commit is contained in:
Tom Alexander
2020-05-17 21:15:03 -04:00
parent ecf2576a0a
commit 7be00ffea6
3 changed files with 0 additions and 53 deletions

View File

@@ -33,7 +33,6 @@ pub enum DustTag<'a> {
DTNotExists(Container<'a>),
DTBlock(NamedBlock<'a>),
DTInlinePartial(NamedBlock<'a>),
DTPartial(Partial<'a>),
DTNewPartial(NewPartial<'a>),
DTHelperEquals(ParameterizedBlock<'a>),
DTHelperNotEquals(ParameterizedBlock<'a>),
@@ -119,12 +118,6 @@ pub struct NewPartial<'a> {
pub params: Vec<KVPair<'a>>,
}
#[derive(Clone, Debug, PartialEq)]
pub struct Partial<'a> {
pub name: String,
pub params: Vec<KVPair<'a>>,
}
#[derive(Clone, Debug, PartialEq)]
pub enum OwnedLiteral {
LString(String),
@@ -610,37 +603,6 @@ where
move |i: &'a str| map(alt((&plain, &quoted)), &constructor)(i)
}
fn partial<'a, F>(
open_matcher: &'static str,
constructor: F,
) -> impl Fn(&'a str) -> IResult<&'a str, DustTag<'a>>
where
F: Fn(Partial<'a>) -> DustTag<'a>,
{
move |i: &'a str| {
let (i, (name, params)) = delimited(
tag(open_matcher),
tuple((
alt((map(key, String::from), quoted_string)),
opt(delimited(
space1,
separated_list1(space1, key_value_pair),
space0,
)),
)),
tag("/}"),
)(i)?;
Ok((
i,
constructor(Partial {
name: name,
params: params.unwrap_or(Vec::new()),
}),
))
}
}
fn filter(i: &str) -> IResult<&str, Filter> {
preceded(
tag("|"),