MCPcopy Create free account
hub / github.com/F-Stack/f-stack / checkrepeated

Function checkrepeated

freebsd/contrib/openzfs/module/lua/lparser.c:1199–1209  ·  view source on GitHub ↗

check for repeated labels on the same block */

Source from the content-addressed store, hash-verified

1197
1198/* check for repeated labels on the same block */
1199static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) {
1200 int i;
1201 for (i = fs->bl->firstlabel; i < ll->n; i++) {
1202 if (luaS_eqstr(label, ll->arr[i].name)) {
1203 const char *msg = luaO_pushfstring(fs->ls->L,
1204 "label " LUA_QS " already defined on line %d",
1205 getstr(label), ll->arr[i].line);
1206 semerror(fs->ls, msg);
1207 }
1208 }
1209}
1210
1211
1212/* skip no-op statements */

Callers 1

labelstatFunction · 0.85

Calls 3

luaS_eqstrFunction · 0.85
semerrorFunction · 0.85
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected