aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];