aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-31 11:13:17 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-31 11:13:17 -0200
commit60ff79451c32e1e6dbec001846871aa878c43289 (patch)
treeabfa9902331d03a44e22ab43a4ec8dbb2e6fe560
parent44a53df688082b9c213bdbeb28acc87c025edeb9 (diff)
downloadlua-60ff79451c32e1e6dbec001846871aa878c43289.tar.gz
lua-60ff79451c32e1e6dbec001846871aa878c43289.tar.bz2
lua-60ff79451c32e1e6dbec001846871aa878c43289.zip
detail in error message
-rw-r--r--lparser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lparser.c b/lparser.c
index 09a5d4f5..e1b9b3a1 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 1.126 2001/01/29 13:14:49 roberto Exp roberto $ 2** $Id: lparser.c,v 1.127 2001/01/29 15:26:40 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*/
@@ -234,7 +234,7 @@ static void pushupvalue (LexState *ls, TString *n) {
234 int level = search_local(ls, n, &v); 234 int level = search_local(ls, n, &v);
235 if (level == -1) { /* global? */ 235 if (level == -1) { /* global? */
236 if (fs->prev == NULL) 236 if (fs->prev == NULL)
237 luaX_syntaxerror(ls, "cannot access upvalue in main", n->str); 237 luaX_syntaxerror(ls, "cannot access an upvalue at top level", n->str);
238 v.u.index = string_constant(fs->prev, n); 238 v.u.index = string_constant(fs->prev, n);
239 } 239 }
240 else if (level != 1) 240 else if (level != 1)