diff options
-rw-r--r-- | lparser.c | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.101 2011/02/09 14:45:19 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.102 2011/02/09 16:51:28 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1253,16 +1253,10 @@ static void repeatstat (LexState *ls, int line) { | |||
1253 | statlist(ls); | 1253 | statlist(ls); |
1254 | check_match(ls, TK_UNTIL, TK_REPEAT, line); | 1254 | check_match(ls, TK_UNTIL, TK_REPEAT, line); |
1255 | condexit = cond(ls); /* read condition (inside scope block) */ | 1255 | condexit = cond(ls); /* read condition (inside scope block) */ |
1256 | if (!bl2.upval) { /* no upvalues? */ | 1256 | if (bl2.upval) /* upvalues? */ |
1257 | leaveblock(fs); /* finish scope */ | 1257 | luaK_patchclose(fs, condexit, bl2.nactvar); |
1258 | luaK_patchlist(fs, condexit, repeat_init); /* close the loop */ | 1258 | leaveblock(fs); /* finish scope */ |
1259 | } | 1259 | luaK_patchlist(fs, condexit, repeat_init); /* close the loop */ |
1260 | else { /* complete semantics when there are upvalues */ | ||
1261 | breakstat(ls); /* if condition then break */ | ||
1262 | luaK_patchtohere(ls->fs, condexit); /* else... */ | ||
1263 | leaveblock(fs); /* finish scope... */ | ||
1264 | luaK_jumpto(fs, repeat_init); /* and repeat */ | ||
1265 | } | ||
1266 | leaveblock(fs); /* finish loop */ | 1260 | leaveblock(fs); /* finish loop */ |
1267 | } | 1261 | } |
1268 | 1262 | ||