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

Function undefgoto

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

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

Source from the content-addressed store, hash-verified

644** generates an error for an undefined 'goto'.
645*/
646static l_noret undefgoto (LexState *ls, Labeldesc *gt) {
647 const char *msg;
648 if (eqstr(gt->name, luaS_newliteral(ls->L, "break"))) {
649 msg = "break outside loop at line %d";
650 msg = luaO_pushfstring(ls->L, msg, gt->line);
651 }
652 else {
653 msg = "no visible label '%s' for <goto> at line %d";
654 msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line);
655 }
656 luaK_semerror(ls, msg);
657}
658
659
660static 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