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

Function gotostat

third-party/lua-5.3.5/src/lparser.c:1187–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185
1186
1187static void gotostat (LexState *ls, int pc) {
1188 int line = ls->linenumber;
1189 TString *label;
1190 int g;
1191 if (testnext(ls, TK_GOTO))
1192 label = str_checkname(ls);
1193 else {
1194 luaX_next(ls); /* skip break */
1195 label = luaS_new(ls->L, "break");
1196 }
1197 g = newlabelentry(ls, &ls->dyd->gt, label, line, pc);
1198 findlabel(ls, g); /* close it if label already defined */
1199}
1200
1201
1202/* check for repeated labels on the same block */

Callers 2

test_then_blockFunction · 0.70
statementFunction · 0.70

Calls 6

testnextFunction · 0.70
str_checknameFunction · 0.70
luaX_nextFunction · 0.70
luaS_newFunction · 0.70
newlabelentryFunction · 0.70
findlabelFunction · 0.70

Tested by 1

test_then_blockFunction · 0.56