ExpressionList = Expression { "," Expression } .
()
| 2730 | |
| 2731 | // ExpressionList = Expression { "," Expression } . |
| 2732 | func (p *parser) exprList() Expr { |
| 2733 | if trace { |
| 2734 | defer p.trace("exprList")() |
| 2735 | } |
| 2736 | |
| 2737 | x := p.expr() |
| 2738 | if p.got(_Comma) { |
| 2739 | list := []Expr{x, p.expr()} |
| 2740 | for p.got(_Comma) { |
| 2741 | list = append(list, p.expr()) |
| 2742 | } |
| 2743 | t := new(ListExpr) |
| 2744 | t.pos = x.Pos() |
| 2745 | t.ElemList = list |
| 2746 | x = t |
| 2747 | } |
| 2748 | return x |
| 2749 | } |
| 2750 | |
| 2751 | // typeList parses a non-empty, comma-separated list of expressions, |
| 2752 | // optionally followed by a comma. The first list element may be any |