MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / labelstat

Function labelstat

ThirdParty/lua/lua/lparser.c:1220–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

statementFunction · 0.85

Calls 6

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

Tested by

no test coverage detected