** Check whether there is already a label with the given 'name'. */
| 1427 | ** Check whether there is already a label with the given 'name'. |
| 1428 | */ |
| 1429 | static void checkrepeated (LexState *ls, TString *name) { |
| 1430 | Labeldesc *lb = findlabel(ls, name); |
| 1431 | if (unlikely(lb != NULL)) { /* already defined? */ |
| 1432 | const char *msg = "label '%s' already defined on line %d"; |
| 1433 | msg = luaO_pushfstring(ls->L, msg, getstr(name), lb->line); |
| 1434 | luaK_semerror(ls, msg); /* error */ |
| 1435 | } |
| 1436 | } |
| 1437 | |
| 1438 | |
| 1439 | static void labelstat (LexState *ls, TString *name, int line) { |
no test coverage detected