check for repeated labels on the same block */
| 1202 | |
| 1203 | /* check for repeated labels on the same block */ |
| 1204 | static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { |
| 1205 | int i; |
| 1206 | for (i = fs->bl->firstlabel; i < ll->n; i++) { |
| 1207 | if (eqstr(label, ll->arr[i].name)) { |
| 1208 | const char *msg = luaO_pushfstring(fs->ls->L, |
| 1209 | "label '%s' already defined on line %d", |
| 1210 | getstr(label), ll->arr[i].line); |
| 1211 | semerror(fs->ls, msg); |
| 1212 | } |
| 1213 | } |
| 1214 | } |
| 1215 | |
| 1216 | |
| 1217 | /* skip no-op statements */ |
no test coverage detected