aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lparser.c b/lparser.c
index 673302df..5c8efeaa 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 1.109 2000/08/15 13:18:28 roberto Exp roberto $ 2** $Id: lparser.c,v 1.110 2000/08/22 17:44:17 roberto Exp roberto $
3** LL(1) Parser and code generator for Lua 3** LL(1) Parser and code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -877,10 +877,9 @@ static void forlist (LexState *ls, TString *indexname) {
877 next(ls); /* skip `in' */ 877 next(ls); /* skip `in' */
878 exp1(ls); /* table */ 878 exp1(ls); /* table */
879 new_localvarstr(ls, "*table*", 0); 879 new_localvarstr(ls, "*table*", 0);
880 new_localvarstr(ls, "*counter*", 1); 880 new_localvar(ls, indexname, 1);
881 new_localvar(ls, indexname, 2); 881 new_localvar(ls, valname, 2);
882 new_localvar(ls, valname, 3); 882 forbody(ls, 3, OP_LFORPREP, OP_LFORLOOP);
883 forbody(ls, 4, OP_LFORPREP, OP_LFORLOOP);
884} 883}
885 884
886 885