Fix combinatorial explosion on backtracking broken if chains
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
b0620a00d5
commit
3f549690c1
3 changed files with 9 additions and 3 deletions
|
|
@ -346,7 +346,7 @@ fn parse_conditional_chain<'input>(
|
|||
chain.push(if_block);
|
||||
|
||||
let content = resume_after_cut(
|
||||
inner_conditional_chain,
|
||||
cut_err(inner_conditional_chain),
|
||||
repeat_till(0.., any, parse_end).map(|((), _)| ()),
|
||||
)
|
||||
.parse_next(input)?;
|
||||
|
|
@ -387,7 +387,7 @@ fn inner_conditional_chain<'input>(
|
|||
};
|
||||
|
||||
if !is_end && needs_end {
|
||||
return Err(AstError::from_input(input).cut());
|
||||
return Err(AstError::from_input(input));
|
||||
}
|
||||
|
||||
if let TemplateAstExpr::Block { expression, .. } = &end_block
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue