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

Method forStatement

parser.go:386–399  ·  view source on GitHub ↗
(line int)

Source from the content-addressed store, hash-verified

384}
385
386func (p *parser) forStatement(line int) {
387 p.function.EnterBlock(true)
388 p.next()
389 switch name := p.checkName(); p.t {
390 case '=':
391 p.forNumeric(name, line)
392 case ',', tkIn:
393 p.forList(name)
394 default:
395 p.syntaxError("'=' or 'in' expected")
396 }
397 p.checkMatch(tkEnd, tkFor, line)
398 p.function.LeaveBlock()
399}
400
401func (p *parser) testThenBlock(escapes int) int {
402 var jumpFalse int

Callers 1

statementMethod · 0.95

Calls 8

checkNameMethod · 0.95
forNumericMethod · 0.95
forListMethod · 0.95
EnterBlockMethod · 0.80
syntaxErrorMethod · 0.80
checkMatchMethod · 0.80
LeaveBlockMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected