(val, limit int, what string)
| 28 | } |
| 29 | |
| 30 | func (p *parser) checkLimit(val, limit int, what string) { |
| 31 | if val > limit { |
| 32 | where := "main function" |
| 33 | if line := p.function.f.lineDefined; line != 0 { |
| 34 | where = fmt.Sprintf("function at line %d", line) |
| 35 | } |
| 36 | p.syntaxError(fmt.Sprintf("too many %s (limit is %d) in %s", what, limit, where)) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func (p *parser) checkNext(t rune) { |
| 41 | p.check(t) |
no test coverage detected