diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 15:41:50 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 15:41:50 -0200 |
commit | 08496eea8b277d37c4de9cf75a011715ad6a4100 (patch) | |
tree | 9c3eef538b85f79ece0a0993e4d99930be6f6039 /lparser.c | |
parent | 4ff55457095728b95cc5dcdbab0bca7255bd5387 (diff) | |
download | lua-08496eea8b277d37c4de9cf75a011715ad6a4100.tar.gz lua-08496eea8b277d37c4de9cf75a011715ad6a4100.tar.bz2 lua-08496eea8b277d37c4de9cf75a011715ad6a4100.zip |
small changes in lstring
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.121 2000/12/28 12:55:41 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.122 2001/01/10 16:40:56 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 | */ |
@@ -182,7 +182,7 @@ static void removelocalvars (LexState *ls, int nvars) { | |||
182 | 182 | ||
183 | 183 | ||
184 | static void new_localvarstr (LexState *ls, const char *name, int n) { | 184 | static void new_localvarstr (LexState *ls, const char *name, int n) { |
185 | new_localvar(ls, luaS_newfixed(ls->L, name), n); | 185 | new_localvar(ls, luaS_new(ls->L, name), n); |
186 | } | 186 | } |
187 | 187 | ||
188 | 188 | ||
@@ -884,7 +884,8 @@ static void forlist (LexState *ls, TString *indexname) { | |||
884 | valname = str_checkname(ls); | 884 | valname = str_checkname(ls); |
885 | /* next test is dirty, but avoids `in' being a reserved word */ | 885 | /* next test is dirty, but avoids `in' being a reserved word */ |
886 | check_condition(ls, | 886 | check_condition(ls, |
887 | (ls->t.token == TK_NAME && ls->t.seminfo.ts == luaS_new(ls->L, "in")), | 887 | (ls->t.token == TK_NAME && |
888 | ls->t.seminfo.ts == luaS_newliteral(ls->L, "in")), | ||
888 | "`in' expected"); | 889 | "`in' expected"); |
889 | next(ls); /* skip `in' */ | 890 | next(ls); /* skip `in' */ |
890 | exp1(ls); /* table */ | 891 | exp1(ls); /* table */ |