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

Method ifStatement

parser.go:430–440  ·  view source on GitHub ↗
(line int)

Source from the content-addressed store, hash-verified

428}
429
430func (p *parser) ifStatement(line int) {
431 escapes := p.testThenBlock(noJump)
432 for p.t == tkElseif {
433 escapes = p.testThenBlock(escapes)
434 }
435 if p.testNext(tkElse) {
436 p.block()
437 }
438 p.checkMatch(tkEnd, tkIf, line)
439 p.function.PatchToHere(escapes)
440}
441
442func (p *parser) block() {
443 p.function.EnterBlock(false)

Callers 1

statementMethod · 0.95

Calls 5

testThenBlockMethod · 0.95
blockMethod · 0.95
testNextMethod · 0.80
checkMatchMethod · 0.80
PatchToHereMethod · 0.80

Tested by

no test coverage detected