Abstract infix macro

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-15 13:48:51 +01:00
parent a590839b21
commit 4f770c1f24
7 changed files with 42 additions and 35 deletions

View file

@ -424,8 +424,9 @@ fn emit_ast_expr(
| TemplateAstExpr::Invalid { .. }
| TemplateAstExpr::Literal { .. }
| TemplateAstExpr::FunctionCall { .. }
| TemplateAstExpr::Operation { .. }
| TemplateAstExpr::MathOperation { .. }
| TemplateAstExpr::ConditionalAccess { .. }
| TemplateAstExpr::AccessOperation { .. }
| TemplateAstExpr::VariableAccess { .. } => eval.push(Instruction::Abort),
}
}
@ -458,7 +459,7 @@ fn emit_expr_load(
slot: emit_slot,
});
}
TemplateAstExpr::Operation { op, lhs, rhs } => {
TemplateAstExpr::MathOperation { op, lhs, rhs } => {
let left_slot = machine.reserve_slot();
emit_expr_load(machine, eval, left_slot, lhs);
let right_slot = machine.reserve_slot();
@ -491,6 +492,7 @@ fn emit_expr_load(
}
TemplateAstExpr::ConditionalChain { .. } => todo!(),
TemplateAstExpr::ElseConditional { .. } => todo!(),
TemplateAstExpr::AccessOperation { .. } => todo!(),
TemplateAstExpr::EndBlock => todo!(),
TemplateAstExpr::Block { .. } => todo!(),
TemplateAstExpr::ForChain { .. } => todo!(),