(name string, line int)
| 347 | } |
| 348 | |
| 349 | func (p *parser) forNumeric(name string, line int) { |
| 350 | expr := func() { p.assert(p.function.ExpressionToNextRegister(p.expression()).kind == kindNonRelocatable) } |
| 351 | base := p.function.freeRegisterCount |
| 352 | p.function.MakeLocalVariable("(for index)") |
| 353 | p.function.MakeLocalVariable("(for limit)") |
| 354 | p.function.MakeLocalVariable("(for step)") |
| 355 | p.function.MakeLocalVariable(name) |
| 356 | p.checkNext('=') |
| 357 | expr() |
| 358 | p.checkNext(',') |
| 359 | expr() |
| 360 | if p.testNext(',') { |
| 361 | expr() |
| 362 | } else { |
| 363 | p.function.EncodeConstant(p.function.freeRegisterCount, p.function.NumberConstant(1)) |
| 364 | p.function.ReserveRegisters(1) |
| 365 | } |
| 366 | p.forBody(base, line, 1, true) |
| 367 | } |
| 368 | |
| 369 | func (p *parser) forList(name string) { |
| 370 | n, base := 4, p.function.freeRegisterCount |
no test coverage detected