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

Method whileStatement

parser.go:448–458  ·  view source on GitHub ↗
(line int)

Source from the content-addressed store, hash-verified

446}
447
448func (p *parser) whileStatement(line int) {
449 p.next()
450 top, conditionExit := p.function.Label(), p.condition()
451 p.function.EnterBlock(true)
452 p.checkNext(tkDo)
453 p.block()
454 p.function.JumpTo(top)
455 p.checkMatch(tkEnd, tkWhile, line)
456 p.function.LeaveBlock()
457 p.function.PatchToHere(conditionExit) // false conditions finish the loop
458}
459
460func (p *parser) repeatStatement(line int) {
461 top := p.function.Label()

Callers 1

statementMethod · 0.95

Calls 10

conditionMethod · 0.95
checkNextMethod · 0.95
blockMethod · 0.95
LabelMethod · 0.80
EnterBlockMethod · 0.80
JumpToMethod · 0.80
checkMatchMethod · 0.80
LeaveBlockMethod · 0.80
PatchToHereMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected