MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / labelstat

Function labelstat

src/Chain/libraries/glua/lparser.cpp:1279–1295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1277
1278
1279static 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
1298static void whilestat(LexState *ls, int line) {

Callers 1

statementFunction · 0.85

Calls 7

checkrepeatedFunction · 0.85
checknextFunction · 0.85
newlabelentryFunction · 0.85
luaK_getlabelFunction · 0.85
skipnoopstatFunction · 0.85
block_followFunction · 0.85
findgotosFunction · 0.85

Tested by

no test coverage detected