** Check whether there is already a label with the given 'name'. */
| 1446 | ** Check whether there is already a label with the given 'name'. |
| 1447 | */ |
| 1448 | static void checkrepeated (LexState *ls, TString *name) { |
| 1449 | Labeldesc *lb = findlabel(ls, name); |
| 1450 | if (l_unlikely(lb != NULL)) { /* already defined? */ |
| 1451 | const char *msg = "label '%s' already defined on line %d"; |
| 1452 | msg = luaO_pushfstring(ls->L, msg, getstr(name), lb->line); |
| 1453 | luaK_semerror(ls, msg); /* error */ |
| 1454 | } |
| 1455 | } |
| 1456 | |
| 1457 | |
| 1458 | static void labelstat (LexState *ls, TString *name, int line) { |
no test coverage detected