MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / labelstat

Function labelstat

third-party/lua-5.3.5/src/lparser.c:1223–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221
1222
1223static 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
1241static void whilestat (LexState *ls, int line) {

Callers 1

statementFunction · 0.70

Calls 7

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

Tested by

no test coverage detected