feat(builtins): macro

This commit is contained in:
2025-08-05 23:54:10 +08:00
parent 64f650b695
commit 32c602f21c
12 changed files with 426 additions and 132 deletions

View File

@@ -135,10 +135,10 @@ impl<Ctx: EvalContext> Evaluate<Ctx> for ir::BinOp {
let mut lhs = self.lhs.eval(ctx)?;
let mut rhs = self.rhs.eval(ctx)?;
match self.kind {
Add => lhs.add(rhs),
Add => lhs.add(rhs)?,
Sub => {
rhs.neg();
lhs.add(rhs);
lhs.add(rhs)?;
}
Mul => lhs.mul(rhs),
Div => lhs.div(rhs)?,