MCPcopy Index your code
hub / github.com/Shopify/go-lua / checkLimit

Method checkLimit

parser.go:30–38  ·  view source on GitHub ↗
(val, limit int, what string)

Source from the content-addressed store, hash-verified

28}
29
30func (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
40func (p *parser) checkNext(t rune) {
41 p.check(t)

Callers 5

enterLevelMethod · 0.95
fieldMethod · 0.95
assignmentMethod · 0.95
MakeLocalVariableMethod · 0.80
makeUpValueMethod · 0.80

Calls 1

syntaxErrorMethod · 0.80

Tested by

no test coverage detected