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

Function checkrepeated

extlibs/lua/src/lparser.c:1429–1436  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1427** Check whether there is already a label with the given 'name'.
1428*/
1429static 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
1439static 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