macros 'LUA_QL'/'LUA_QL' deprecated

This commit is contained in:
Roberto Ierusalimschy
2014-10-17 13:28:21 -03:00
parent ea3155e380
commit f97c64d7bf
16 changed files with 67 additions and 75 deletions

8
llex.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: llex.c,v 2.81 2014/10/01 11:52:33 roberto Exp roberto $
** $Id: llex.c,v 2.82 2014/10/10 22:23:04 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -79,12 +79,12 @@ void luaX_init (lua_State *L) {
const char *luaX_token2str (LexState *ls, int token) {
if (token < FIRST_RESERVED) { /* single-byte symbols? */
lua_assert(token == cast_uchar(token));
return luaO_pushfstring(ls->L, LUA_QL("%c"), token);
return luaO_pushfstring(ls->L, "'%c'", token);
}
else {
const char *s = luaX_tokens[token - FIRST_RESERVED];
if (token < TK_EOS) /* fixed format (symbols and reserved words)? */
return luaO_pushfstring(ls->L, LUA_QS, s);
return luaO_pushfstring(ls->L, "'%s'", s);
else /* names, strings, and numerals */
return s;
}
@@ -96,7 +96,7 @@ static const char *txtToken (LexState *ls, int token) {
case TK_NAME: case TK_STRING:
case TK_FLT: case TK_INT:
save(ls, '\0');
return luaO_pushfstring(ls->L, LUA_QS, luaZ_buffer(ls->buff));
return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff));
default:
return luaX_token2str(ls, token);
}