Add a noop if no whitespace is emitted to have something to jump to
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
59f92e31fe
commit
e0e84ede1c
6 changed files with 16 additions and 11 deletions
|
|
@ -45,6 +45,7 @@ pub enum Instruction {
|
|||
Jump {
|
||||
jump: isize,
|
||||
},
|
||||
NoOp,
|
||||
}
|
||||
|
||||
pub fn emit_machine(input: crate::ast::TemplateAst<'_>) -> Vec<Instruction> {
|
||||
|
|
@ -185,6 +186,8 @@ fn emit_ast_expr(
|
|||
eval.push(Instruction::AppendContent {
|
||||
content: ws.source().clone(),
|
||||
});
|
||||
} else {
|
||||
eval.push(Instruction::NoOp);
|
||||
}
|
||||
|
||||
for index in end_indices {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue