diff options
author | Wim <wim@42.be> | 2022-09-05 21:00:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 21:00:54 +0200 |
commit | fda05f22629156cc2eae130b501ebced2261ab42 (patch) | |
tree | b9761fb5202ab476b11c1136a5bea69df0dd0f83 /vendor/github.com/d5/tengo/v2/compiler.go | |
parent | 7abf1a5884bfba9ac19df26495924d86613874f3 (diff) | |
download | matterbridge-msglm-fda05f22629156cc2eae130b501ebced2261ab42.tar.gz matterbridge-msglm-fda05f22629156cc2eae130b501ebced2261ab42.tar.bz2 matterbridge-msglm-fda05f22629156cc2eae130b501ebced2261ab42.zip |
Update dependencies and fix whatsmeow API changes (#1887)
* Update dependencies
* Fix whatsmau API changes
Diffstat (limited to 'vendor/github.com/d5/tengo/v2/compiler.go')
-rw-r--r-- | vendor/github.com/d5/tengo/v2/compiler.go | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/vendor/github.com/d5/tengo/v2/compiler.go b/vendor/github.com/d5/tengo/v2/compiler.go index 0d46a4d7..f5fc5536 100644 --- a/vendor/github.com/d5/tengo/v2/compiler.go +++ b/vendor/github.com/d5/tengo/v2/compiler.go @@ -141,25 +141,7 @@ func (c *Compiler) Compile(node parser.Node) error { if node.Token == token.LAnd || node.Token == token.LOr { return c.compileLogical(node) } - if node.Token == token.Less { - if err := c.Compile(node.RHS); err != nil { - return err - } - if err := c.Compile(node.LHS); err != nil { - return err - } - c.emit(node, parser.OpBinaryOp, int(token.Greater)) - return nil - } else if node.Token == token.LessEq { - if err := c.Compile(node.RHS); err != nil { - return err - } - if err := c.Compile(node.LHS); err != nil { - return err - } - c.emit(node, parser.OpBinaryOp, int(token.GreaterEq)) - return nil - } + if err := c.Compile(node.LHS); err != nil { return err } @@ -182,6 +164,10 @@ func (c *Compiler) Compile(node parser.Node) error { c.emit(node, parser.OpBinaryOp, int(token.Greater)) case token.GreaterEq: c.emit(node, parser.OpBinaryOp, int(token.GreaterEq)) + case token.Less: + c.emit(node, parser.OpBinaryOp, int(token.Less)) + case token.LessEq: + c.emit(node, parser.OpBinaryOp, int(token.LessEq)) case token.Equal: c.emit(node, parser.OpEqual) case token.NotEqual: |