aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-12-02 11:23:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-12-02 11:23:56 -0200
commit5999e14ad90a7df3834f4141a52eac1f12cdfc10 (patch)
treee980b0e8b96ab46d3462bab2275ec0a7a76d5964
parent01747f2c24d8334280b329dc11cf8f25ccc1f1a5 (diff)
downloadlua-5999e14ad90a7df3834f4141a52eac1f12cdfc10.tar.gz
lua-5999e14ad90a7df3834f4141a52eac1f12cdfc10.tar.bz2
lua-5999e14ad90a7df3834f4141a52eac1f12cdfc10.zip
old error messages may be misleading
-rw-r--r--lparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lparser.c b/lparser.c
index 08d19045..a1b1b84c 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.122 2011/10/31 17:46:04 roberto Exp roberto $ 2** $Id: lparser.c,v 2.123 2011/11/30 12:43:51 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*/
@@ -330,7 +330,7 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
330static void enterlevel (LexState *ls) { 330static void enterlevel (LexState *ls) {
331 lua_State *L = ls->L; 331 lua_State *L = ls->L;
332 ++L->nCcalls; 332 ++L->nCcalls;
333 checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "syntax levels"); 333 checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "C levels");
334} 334}
335 335
336 336
@@ -1147,8 +1147,8 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
1147 primaryexp(ls, &nv.v); 1147 primaryexp(ls, &nv.v);
1148 if (nv.v.k != VINDEXED) 1148 if (nv.v.k != VINDEXED)
1149 check_conflict(ls, lh, &nv.v); 1149 check_conflict(ls, lh, &nv.v);
1150 checklimit(ls->fs, nvars, LUAI_MAXCCALLS - ls->L->nCcalls, 1150 checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS,
1151 "variable names"); 1151 "C levels");
1152 assignment(ls, &nv, nvars+1); 1152 assignment(ls, &nv, nvars+1);
1153 } 1153 }
1154 else { /* assignment -> `=' explist */ 1154 else { /* assignment -> `=' explist */