| 1185 | |
| 1186 | |
| 1187 | static 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 */ |