MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / checkrepeated

Function checkrepeated

src/Chain/libraries/glua/lparser.cpp:1259–1269  ·  view source on GitHub ↗

check for repeated labels on the same block */

Source from the content-addressed store, hash-verified

1257
1258/* check for repeated labels on the same block */
1259static void checkrepeated(FuncState *fs, Labellist *ll, TString *label) {
1260 int i;
1261 for (i = fs->bl->firstlabel; i < ll->n; i++) {
1262 if (eqstr(label, ll->arr[i].name)) {
1263 const char *msg = luaO_pushfstring(fs->ls->L,
1264 "label '%s' already defined on line %d",
1265 getstr(label), ll->arr[i].line);
1266 semerror(fs->ls, msg);
1267 }
1268 }
1269}
1270
1271
1272/* skip no-op statements */

Callers 1

labelstatFunction · 0.85

Calls 2

luaO_pushfstringFunction · 0.85
semerrorFunction · 0.85

Tested by

no test coverage detected