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

Function gotostat

third-party/lua-5.2.4/src/lparser.c:1179–1191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1177
1178
1179static void gotostat (LexState *ls, int pc) {
1180 int line = ls->linenumber;
1181 TString *label;
1182 int g;
1183 if (testnext(ls, TK_GOTO))
1184 label = str_checkname(ls);
1185 else {
1186 luaX_next(ls); /* skip break */
1187 label = luaS_new(ls->L, "break");
1188 }
1189 g = newlabelentry(ls, &ls->dyd->gt, label, line, pc);
1190 findlabel(ls, g); /* close it if label already defined */
1191}
1192
1193
1194/* 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