summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-15 15:57:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-15 15:57:44 -0300
commitb7a0503c1d72603b8f7e480f2abecbc05348cb69 (patch)
treebfac646fea320f73abec2ee57a0c96a704452884 /llex.c
parent1c328a191a8b86b7ad601cb9a935f1da5373fdf7 (diff)
downloadlua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.tar.gz
lua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.tar.bz2
lua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.zip
new format for error messages
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/llex.c b/llex.c
index 91dd6379..90e6698b 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.99 2002/03/08 19:25:24 roberto Exp roberto $ 2** $Id: llex.c,v 1.100 2002/05/07 17:36:56 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -61,8 +61,7 @@ static void luaX_error (LexState *ls, const char *s, const char *token) {
61 lua_State *L = ls->L; 61 lua_State *L = ls->L;
62 char buff[MAXSRC]; 62 char buff[MAXSRC];
63 luaO_chunkid(buff, getstr(ls->source), MAXSRC); 63 luaO_chunkid(buff, getstr(ls->source), MAXSRC);
64 luaO_pushstr(L, "%s;\n last token read: `%s' at line %d in %s", 64 luaO_pushstr(L, "%s:%d: %s near `%s'", buff, ls->linenumber, s, token);
65 s, token, ls->linenumber, buff);
66 luaD_errorobj(L, L->top - 1, LUA_ERRSYNTAX); 65 luaD_errorobj(L, L->top - 1, LUA_ERRSYNTAX);
67} 66}
68 67