(line int)
| 458 | } |
| 459 | |
| 460 | func (p *parser) repeatStatement(line int) { |
| 461 | top := p.function.Label() |
| 462 | p.function.EnterBlock(true) // loop block |
| 463 | p.function.EnterBlock(false) // scope block |
| 464 | p.next() |
| 465 | p.statementList() |
| 466 | p.checkMatch(tkUntil, tkRepeat, line) |
| 467 | conditionExit := p.condition() |
| 468 | if p.function.block.hasUpValue { |
| 469 | p.function.PatchClose(conditionExit, p.function.block.activeVariableCount) |
| 470 | } |
| 471 | p.function.LeaveBlock() // finish scope |
| 472 | p.function.PatchList(conditionExit, top) // close loop |
| 473 | p.function.LeaveBlock() // finish loop |
| 474 | } |
| 475 | |
| 476 | func (p *parser) condition() int { |
| 477 | e := p.expression() |
no test coverage detected