MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / checkrepeated

Function checkrepeated

xrepo/packages/l/lua/port/lua/src/lparser.c:1447–1454  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

labelstatFunction · 0.85

Calls 3

findlabelFunction · 0.85
luaK_semerrorFunction · 0.85
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected