From 115d20373c21b107a428a55247c64f900e116038 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 6 Apr 2019 22:18:25 +0200 Subject: Update tengo vendor and load the stdlib. Fixes #789 (#792) --- .../d5/tengo/compiler/compiler_assign.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'vendor/github.com/d5/tengo/compiler/compiler_assign.go') diff --git a/vendor/github.com/d5/tengo/compiler/compiler_assign.go b/vendor/github.com/d5/tengo/compiler/compiler_assign.go index 0e086c83..59296f6f 100644 --- a/vendor/github.com/d5/tengo/compiler/compiler_assign.go +++ b/vendor/github.com/d5/tengo/compiler/compiler_assign.go @@ -51,27 +51,27 @@ func (c *Compiler) compileAssign(node ast.Node, lhs, rhs []ast.Expr, op token.To switch op { case token.AddAssign: - c.emit(node, OpAdd) + c.emit(node, OpBinaryOp, int(token.Add)) case token.SubAssign: - c.emit(node, OpSub) + c.emit(node, OpBinaryOp, int(token.Sub)) case token.MulAssign: - c.emit(node, OpMul) + c.emit(node, OpBinaryOp, int(token.Mul)) case token.QuoAssign: - c.emit(node, OpDiv) + c.emit(node, OpBinaryOp, int(token.Quo)) case token.RemAssign: - c.emit(node, OpRem) + c.emit(node, OpBinaryOp, int(token.Rem)) case token.AndAssign: - c.emit(node, OpBAnd) + c.emit(node, OpBinaryOp, int(token.And)) case token.OrAssign: - c.emit(node, OpBOr) + c.emit(node, OpBinaryOp, int(token.Or)) case token.AndNotAssign: - c.emit(node, OpBAndNot) + c.emit(node, OpBinaryOp, int(token.AndNot)) case token.XorAssign: - c.emit(node, OpBXor) + c.emit(node, OpBinaryOp, int(token.Xor)) case token.ShlAssign: - c.emit(node, OpBShiftLeft) + c.emit(node, OpBinaryOp, int(token.Shl)) case token.ShrAssign: - c.emit(node, OpBShiftRight) + c.emit(node, OpBinaryOp, int(token.Shr)) } // compile selector expressions (right to left) -- cgit v1.2.3