MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / exprList

Method exprList

syntax/parser.go:2732–2749  ·  view source on GitHub ↗

ExpressionList = Expression { "," Expression } .

()

Source from the content-addressed store, hash-verified

2730
2731// ExpressionList = Expression { "," Expression } .
2732func (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

Callers 5

constSpecMethod · 0.95
varSpecMethod · 0.95
simpleStmtMethod · 0.95
caseClauseMethod · 0.95
stmtOrNilMethod · 0.95

Calls 6

traceMethod · 0.95
exprMethod · 0.95
gotMethod · 0.95
PosMethod · 0.65
appendFunction · 0.50
newFunction · 0.50

Tested by

no test coverage detected