check for repeated labels on the same block */
| 1257 | |
| 1258 | /* check for repeated labels on the same block */ |
| 1259 | static 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 */ |
no test coverage detected