| 1177 | |
| 1178 | |
| 1179 | static 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 */ |