aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lparser.c b/lparser.c
index 27c8a927..29022bfd 100644
--- a/lparser.c
+++ b/lparser.c
@@ -707,7 +707,7 @@ static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) {
707*/ 707*/
708static l_noret undefgoto (LexState *ls, Labeldesc *gt) { 708static l_noret undefgoto (LexState *ls, Labeldesc *gt) {
709 /* breaks are checked when created, cannot be undefined */ 709 /* breaks are checked when created, cannot be undefined */
710 lua_assert(!eqstr(gt->name, luaS_newliteral(ls->L, "break"))); 710 lua_assert(!eqstr(gt->name, ls->brkn));
711 luaK_semerror(ls, "no visible label '%s' for <goto> at line %d", 711 luaK_semerror(ls, "no visible label '%s' for <goto> at line %d",
712 getstr(gt->name), gt->line); 712 getstr(gt->name), gt->line);
713} 713}
@@ -723,7 +723,7 @@ static void leaveblock (FuncState *fs) {
723 removevars(fs, bl->nactvar); /* remove block locals */ 723 removevars(fs, bl->nactvar); /* remove block locals */
724 lua_assert(bl->nactvar == fs->nactvar); /* back to level on entry */ 724 lua_assert(bl->nactvar == fs->nactvar); /* back to level on entry */
725 if (bl->isloop == 2) /* has to fix pending breaks? */ 725 if (bl->isloop == 2) /* has to fix pending breaks? */
726 createlabel(ls, luaS_newliteral(ls->L, "break"), 0, 0); 726 createlabel(ls, ls->brkn, 0, 0);
727 solvegotos(fs, bl); 727 solvegotos(fs, bl);
728 if (bl->previous == NULL) { /* was it the last block? */ 728 if (bl->previous == NULL) { /* was it the last block? */
729 if (bl->firstgoto < ls->dyd->gt.n) /* still pending gotos? */ 729 if (bl->firstgoto < ls->dyd->gt.n) /* still pending gotos? */
@@ -1497,7 +1497,7 @@ static void breakstat (LexState *ls, int line) {
1497 ok: 1497 ok:
1498 bl->isloop = 2; /* signal that block has pending breaks */ 1498 bl->isloop = 2; /* signal that block has pending breaks */
1499 luaX_next(ls); /* skip break */ 1499 luaX_next(ls); /* skip break */
1500 newgotoentry(ls, luaS_newliteral(ls->L, "break"), line); 1500 newgotoentry(ls, ls->brkn, line);
1501} 1501}
1502 1502
1503 1503