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

Function undefgoto

extlibs/lua/src/lparser.c:640–651  ·  view source on GitHub ↗

** generates an error for an undefined 'goto'. */

Source from the content-addressed store, hash-verified

638** generates an error for an undefined 'goto'.
639*/
640static l_noret undefgoto (LexState *ls, Labeldesc *gt) {
641 const char *msg;
642 if (eqstr(gt->name, luaS_newliteral(ls->L, "break"))) {
643 msg = "break outside loop at line %d";
644 msg = luaO_pushfstring(ls->L, msg, gt->line);
645 }
646 else {
647 msg = "no visible label '%s' for <goto> at line %d";
648 msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line);
649 }
650 luaK_semerror(ls, msg);
651}
652
653
654static void leaveblock (FuncState *fs) {

Callers 1

leaveblockFunction · 0.85

Calls 2

luaO_pushfstringFunction · 0.85
luaK_semerrorFunction · 0.85

Tested by

no test coverage detected