MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / undefgoto

Function undefgoto

third-party/lua-5.4.6/src/lparser.c:658–669  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

656** generates an error for an undefined 'goto'.
657*/
658static l_noret undefgoto (LexState *ls, Labeldesc *gt) {
659 const char *msg;
660 if (eqstr(gt->name, luaS_newliteral(ls->L, "break"))) {
661 msg = "break outside loop at line %d";
662 msg = luaO_pushfstring(ls->L, msg, gt->line);
663 }
664 else {
665 msg = "no visible label '%s' for <goto> at line %d";
666 msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line);
667 }
668 luaK_semerror(ls, msg);
669}
670
671
672static void leaveblock (FuncState *fs) {

Callers 1

leaveblockFunction · 0.70

Calls 2

luaO_pushfstringFunction · 0.70
luaK_semerrorFunction · 0.70

Tested by

no test coverage detected