MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / findlabel

Function findlabel

lib/lua/src/lparser.c:544–554  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

gotostatFunction · 0.85
checkrepeatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected