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

Function labelstat

third-party/lua-5.2.4/src/lparser.c:1215–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

statementFunction · 0.70

Calls 6

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

Tested by

no test coverage detected