mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 23:35:07 +00:00
parser: move test for completeness
This commit is contained in:
parent
4315773676
commit
11f3d0714c
@ -36,12 +36,12 @@ pub enum Node<'a> {
|
|||||||
|
|
||||||
impl<'a> Node<'a> {
|
impl<'a> Node<'a> {
|
||||||
pub(super) fn many(i: &'a str, s: &State<'_>) -> IResult<&'a str, Vec<Self>> {
|
pub(super) fn many(i: &'a str, s: &State<'_>) -> IResult<&'a str, Vec<Self>> {
|
||||||
many0(alt((
|
complete(many0(alt((
|
||||||
map(complete(|i| Lit::parse(i, s)), Self::Lit),
|
map(|i| Lit::parse(i, s), Self::Lit),
|
||||||
map(complete(|i| Comment::parse(i, s)), Self::Comment),
|
map(|i| Comment::parse(i, s), Self::Comment),
|
||||||
complete(|i| Self::expr(i, s)),
|
|i| Self::expr(i, s),
|
||||||
complete(|i| Self::parse(i, s)),
|
|i| Self::parse(i, s),
|
||||||
)))(i)
|
))))(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse(i: &'a str, s: &State<'_>) -> IResult<&'a str, Self> {
|
fn parse(i: &'a str, s: &State<'_>) -> IResult<&'a str, Self> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user