MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / findlabel

Function findlabel

3rd/lua-5.4.3/src/lparser.c:532–542  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

530** Search for an active label with the given name.
531*/
532static Labeldesc *findlabel (LexState *ls, TString *name) {
533 int i;
534 Dyndata *dyd = ls->dyd;
535 /* check labels in current function for a match */
536 for (i = ls->fs->firstlabel; i < dyd->label.n; i++) {
537 Labeldesc *lb = &dyd->label.arr[i];
538 if (eqstr(lb->name, name)) /* correct label? */
539 return lb;
540 }
541 return NULL; /* label not found */
542}
543
544
545/*

Callers 2

gotostatFunction · 0.85
checkrepeatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected