diff options
author | Wim <wim@42.be> | 2020-07-18 17:27:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 17:27:41 +0200 |
commit | 23d8742f0d95096b92f11729fb47f86ac3b68d43 (patch) | |
tree | 7b8acb02b051ae06e5454fda4a9d5118428fe016 /vendor/github.com/d5/tengo/v2/parser/expr.go | |
parent | 3b6a8be07b9422714db30fb50977f342057febf3 (diff) | |
download | matterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.tar.gz matterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.tar.bz2 matterbridge-msglm-23d8742f0d95096b92f11729fb47f86ac3b68d43.zip |
Update dependencies for 1.18.0 release (#1175)
Diffstat (limited to 'vendor/github.com/d5/tengo/v2/parser/expr.go')
-rw-r--r-- | vendor/github.com/d5/tengo/v2/parser/expr.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/d5/tengo/v2/parser/expr.go b/vendor/github.com/d5/tengo/v2/parser/expr.go index 71e5155b..b6b6c62b 100644 --- a/vendor/github.com/d5/tengo/v2/parser/expr.go +++ b/vendor/github.com/d5/tengo/v2/parser/expr.go @@ -111,10 +111,11 @@ func (e *BoolLit) String() string { // CallExpr represents a function call expression. type CallExpr struct { - Func Expr - LParen Pos - Args []Expr - RParen Pos + Func Expr + LParen Pos + Args []Expr + Ellipsis Pos + RParen Pos } func (e *CallExpr) exprNode() {} @@ -134,6 +135,9 @@ func (e *CallExpr) String() string { for _, e := range e.Args { args = append(args, e.String()) } + if len(args) > 0 && e.Ellipsis.IsValid() { + args[len(args)-1] = args[len(args)-1] + "..." + } return e.Func.String() + "(" + strings.Join(args, ", ") + ")" } |