| 1221 | |
| 1222 | |
| 1223 | static void labelstat (LexState *ls, TString *label, int line) { |
| 1224 | /* label -> '::' NAME '::' */ |
| 1225 | FuncState *fs = ls->fs; |
| 1226 | Labellist *ll = &ls->dyd->label; |
| 1227 | int l; /* index of new label being created */ |
| 1228 | checkrepeated(fs, ll, label); /* check for repeated labels */ |
| 1229 | checknext(ls, TK_DBCOLON); /* skip double colon */ |
| 1230 | /* create new entry for this label */ |
| 1231 | l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs)); |
| 1232 | skipnoopstat(ls); /* skip other no-op statements */ |
| 1233 | if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ |
| 1234 | /* assume that locals are already out of scope */ |
| 1235 | ll->arr[l].nactvar = fs->bl->nactvar; |
| 1236 | } |
| 1237 | findgotos(ls, &ll->arr[l]); |
| 1238 | } |
| 1239 | |
| 1240 | |
| 1241 | static void whilestat (LexState *ls, int line) { |
no test coverage detected