aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-08-09 17:29:15 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-08-09 17:29:15 -0300
commit3059579253d784a2bfeae2de9d5854a0814bc526 (patch)
tree1eec489e17f89b771a4270cf4e7558e9ec8f6327 /llex.c
parent72c2f756489e3dc88105ebd32058a9951847cb29 (diff)
downloadlua-3059579253d784a2bfeae2de9d5854a0814bc526.tar.gz
lua-3059579253d784a2bfeae2de9d5854a0814bc526.tar.bz2
lua-3059579253d784a2bfeae2de9d5854a0814bc526.zip
detail
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/llex.c b/llex.c
index adb3527c..c410d3c0 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.24 2007/02/07 17:49:18 roberto Exp roberto $ 2** $Id: llex.c,v 2.25 2007/05/11 17:28: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*/
@@ -77,8 +77,8 @@ void luaX_init (lua_State *L) {
77const char *luaX_token2str (LexState *ls, int token) { 77const char *luaX_token2str (LexState *ls, int token) {
78 if (token < FIRST_RESERVED) { 78 if (token < FIRST_RESERVED) {
79 lua_assert(token == cast(unsigned char, token)); 79 lua_assert(token == cast(unsigned char, token));
80 return (iscntrl(token)) ? luaO_pushfstring(ls->L, "char(%d)", token) : 80 return (isprint(token)) ? luaO_pushfstring(ls->L, LUA_QL("%c"), token) :
81 luaO_pushfstring(ls->L, LUA_QL("%c"), token); 81 luaO_pushfstring(ls->L, "char(%d)", token);
82 } 82 }
83 else { 83 else {
84 const char *s = luaX_tokens[token - FIRST_RESERVED]; 84 const char *s = luaX_tokens[token - FIRST_RESERVED];