MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / checkrepeated

Function checkrepeated

Dependencies/lua/src/lparser.c:1448–1455  ·  view source on GitHub ↗

** Check whether there is already a label with the given 'name'. */

Source from the content-addressed store, hash-verified

1446** Check whether there is already a label with the given 'name'.
1447*/
1448static 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
1458static void labelstat (LexState *ls, TString *name, int line) {

Callers 1

labelstatFunction · 0.85

Calls 3

findlabelFunction · 0.85
luaO_pushfstringFunction · 0.85
luaK_semerrorFunction · 0.85

Tested by

no test coverage detected