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