| 1277 | |
| 1278 | |
| 1279 | static void labelstat(LexState *ls, TString *label, int line) { |
| 1280 | /* label -> '::' NAME '::' */ |
| 1281 | FuncState *fs = ls->fs; |
| 1282 | Labellist *ll = &ls->dyd->label; |
| 1283 | int l; /* index of new label being created */ |
| 1284 | checkrepeated(fs, ll, label); /* check for repeated labels */ |
| 1285 | checknext(ls, TK_DBCOLON); /* skip double colon */ |
| 1286 | /* create new entry for this label */ |
| 1287 | // l = newlabelentry(ls, ll, label, line, fs->pc); |
| 1288 | l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs)); |
| 1289 | skipnoopstat(ls); /* skip other no-op statements */ |
| 1290 | if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ |
| 1291 | /* assume that locals are already out of scope */ |
| 1292 | ll->arr[l].nactvar = fs->bl->nactvar; |
| 1293 | } |
| 1294 | findgotos(ls, &ll->arr[l]); |
| 1295 | } |
| 1296 | |
| 1297 | |
| 1298 | static void whilestat(LexState *ls, int line) { |
no test coverage detected