diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-15 15:57:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-15 15:57:44 -0300 |
commit | b7a0503c1d72603b8f7e480f2abecbc05348cb69 (patch) | |
tree | bfac646fea320f73abec2ee57a0c96a704452884 /llex.c | |
parent | 1c328a191a8b86b7ad601cb9a935f1da5373fdf7 (diff) | |
download | lua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.tar.gz lua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.tar.bz2 lua-b7a0503c1d72603b8f7e480f2abecbc05348cb69.zip |
new format for error messages
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 | ||