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