aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-31 11:08:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-08-31 11:08:27 -0300
commit100bfec39a3de3029a97e645e7fe33877d7bbc2f (patch)
tree01c2c9bb63f71d3fb186b8f5be0b7577978f8a19 /lparser.c
parenta290b84c670bbf0770d76429e7282c555a80058e (diff)
downloadlua-100bfec39a3de3029a97e645e7fe33877d7bbc2f.tar.gz
lua-100bfec39a3de3029a97e645e7fe33877d7bbc2f.tar.bz2
lua-100bfec39a3de3029a97e645e7fe33877d7bbc2f.zip
new implementation for `next'
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