diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-31 11:13:17 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-31 11:13:17 -0200 |
commit | 60ff79451c32e1e6dbec001846871aa878c43289 (patch) | |
tree | abfa9902331d03a44e22ab43a4ec8dbb2e6fe560 | |
parent | 44a53df688082b9c213bdbeb28acc87c025edeb9 (diff) | |
download | lua-60ff79451c32e1e6dbec001846871aa878c43289.tar.gz lua-60ff79451c32e1e6dbec001846871aa878c43289.tar.bz2 lua-60ff79451c32e1e6dbec001846871aa878c43289.zip |
detail in error message
-rw-r--r-- | lparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |