(name string)
| 549 | } |
| 550 | |
| 551 | func (fc *funcContext) FindLocalVarAndBlock(name string) (int, *codeBlock) { |
| 552 | for block := fc.Block; block != nil; block = block.Parent { |
| 553 | if index := block.LocalVars.Find(name); index > -1 { |
| 554 | return index, block |
| 555 | } |
| 556 | } |
| 557 | return -1, nil |
| 558 | } |
| 559 | |
| 560 | func (fc *funcContext) FindLocalVar(name string) int { |
| 561 | idx, _ := fc.FindLocalVarAndBlock(name) |
no test coverage detected