From 23d8742f0d95096b92f11729fb47f86ac3b68d43 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 18 Jul 2020 17:27:41 +0200 Subject: Update dependencies for 1.18.0 release (#1175) --- vendor/github.com/d5/tengo/v2/parser/parser.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'vendor/github.com/d5/tengo/v2/parser/parser.go') diff --git a/vendor/github.com/d5/tengo/v2/parser/parser.go b/vendor/github.com/d5/tengo/v2/parser/parser.go index 501a9106..fd20423b 100644 --- a/vendor/github.com/d5/tengo/v2/parser/parser.go +++ b/vendor/github.com/d5/tengo/v2/parser/parser.go @@ -270,9 +270,13 @@ func (p *Parser) parseCall(x Expr) *CallExpr { p.exprLevel++ var list []Expr - for p.token != token.RParen && p.token != token.EOF { + var ellipsis Pos + for p.token != token.RParen && p.token != token.EOF && !ellipsis.IsValid() { list = append(list, p.parseExpr()) - + if p.token == token.Ellipsis { + ellipsis = p.pos + p.next() + } if !p.expectComma(token.RParen, "call argument") { break } @@ -281,10 +285,11 @@ func (p *Parser) parseCall(x Expr) *CallExpr { p.exprLevel-- rparen := p.expect(token.RParen) return &CallExpr{ - Func: x, - LParen: lparen, - RParen: rparen, - Args: list, + Func: x, + LParen: lparen, + RParen: rparen, + Ellipsis: ellipsis, + Args: list, } } -- cgit v1.2.3