MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / findlabel

Function findlabel

xrepo/packages/l/lua/port/lua/src/lparser.c:543–553  ·  view source on GitHub ↗

** Search for an active label with the given name. */

Source from the content-addressed store, hash-verified

541** Search for an active label with the given name.
542*/
543static Labeldesc *findlabel (LexState *ls, TString *name) {
544 int i;
545 Dyndata *dyd = ls->dyd;
546 /* check labels in current function for a match */
547 for (i = ls->fs->firstlabel; i < dyd->label.n; i++) {
548 Labeldesc *lb = &dyd->label.arr[i];
549 if (eqstr(lb->name, name)) /* correct label? */
550 return lb;
551 }
552 return NULL; /* label not found */
553}
554
555
556/*

Callers 2

gotostatFunction · 0.85
checkrepeatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected