MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / jumpscopeerror

Function jumpscopeerror

extlibs/lua/src/lparser.c:496–501  ·  view source on GitHub ↗

** Generates an error that a goto jumps into the scope of some ** local variable. */

Source from the content-addressed store, hash-verified

494** local variable.
495*/
496static l_noret jumpscopeerror (LexState *ls, Labeldesc *gt) {
497 const char *varname = getstr(getlocalvardesc(ls->fs, gt->nactvar)->vd.name);
498 const char *msg = "<goto %s> at line %d jumps into the scope of local '%s'";
499 msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line, varname);
500 luaK_semerror(ls, msg); /* raise the error */
501}
502
503
504/*

Callers 1

solvegotoFunction · 0.85

Calls 3

getlocalvardescFunction · 0.85
luaO_pushfstringFunction · 0.85
luaK_semerrorFunction · 0.85

Tested by

no test coverage detected