** generates an error for an undefined 'goto'; choose appropriate ** message when label name is a reserved word (which can only be 'break') */
| 482 | ** message when label name is a reserved word (which can only be 'break') |
| 483 | */ |
| 484 | static l_noret undefgoto(LexState *ls, Labeldesc *gt) { |
| 485 | const char *msg = isreserved(gt->name) |
| 486 | ? "<%s> at line %d not inside a loop" |
| 487 | : "no visible label '%s' for <goto> at line %d"; |
| 488 | msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); |
| 489 | semerror(ls, msg); |
| 490 | } |
| 491 | |
| 492 | |
| 493 | static void leaveblock(FuncState *fs) { |
no test coverage detected