(arguments []Node)
| 645 | } |
| 646 | |
| 647 | func (p *Parser) parseArguments(arguments []Node) []Node { |
| 648 | // If pipe operator is used, the first argument is the left-hand side |
| 649 | // of the operator, so we do not parse it as an argument inside brackets. |
| 650 | offset := len(arguments) |
| 651 | |
| 652 | p.expect(Bracket, "(") |
| 653 | for !p.current.Is(Bracket, ")") && p.err == nil { |
| 654 | if len(arguments) > offset { |
| 655 | p.expect(Operator, ",") |
| 656 | } |
| 657 | if p.current.Is(Bracket, ")") { |
| 658 | break |
| 659 | } |
| 660 | node := p.parseExpression(0) |
| 661 | arguments = append(arguments, node) |
| 662 | } |
| 663 | p.expect(Bracket, ")") |
| 664 | |
| 665 | return arguments |
| 666 | } |
| 667 | |
| 668 | func (p *Parser) parsePredicate() Node { |
| 669 | startToken := p.current |
no test coverage detected