()
| 508 | } |
| 509 | |
| 510 | func (p *parser) parameterList() { |
| 511 | n, isVarArg := 0, false |
| 512 | if p.t != ')' { |
| 513 | for first := true; first || (!isVarArg && p.testNext(',')); first = false { |
| 514 | switch p.t { |
| 515 | case tkName: |
| 516 | p.function.MakeLocalVariable(p.checkName()) |
| 517 | n++ |
| 518 | case tkDots: |
| 519 | p.next() |
| 520 | isVarArg = true |
| 521 | default: |
| 522 | p.syntaxError("<name> or '...' expected") |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | // TODO the following lines belong in a *function method |
| 527 | p.function.f.isVarArg = isVarArg |
| 528 | p.function.AdjustLocalVariables(n) |
| 529 | p.function.f.parameterCount = p.function.activeVariableCount |
| 530 | p.function.ReserveRegisters(p.function.activeVariableCount) |
| 531 | } |
| 532 | |
| 533 | func (p *parser) body(isMethod bool, line int) exprDesc { |
| 534 | p.function.OpenFunction(line) |
no test coverage detected