MCPcopy Create free account
hub / github.com/F-Stack/f-stack / labelstat

Function labelstat

freebsd/contrib/openzfs/module/lua/lparser.c:1219–1234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

statementFunction · 0.85

Calls 6

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

Tested by

no test coverage detected