diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
commit | f97c64d7bf4c0f373711795d8faba0e8cd206761 (patch) | |
tree | 99c9e25132b2ef193dc417873e8f44e5c0ea8738 /llex.c | |
parent | ea3155e380080095a6f8c63297f0505789cf08b7 (diff) | |
download | lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.gz lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.bz2 lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.zip |
macros 'LUA_QL'/'LUA_QL' deprecated
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.81 2014/10/01 11:52:33 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.82 2014/10/10 22:23:04 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 | */ |
@@ -79,12 +79,12 @@ void luaX_init (lua_State *L) { | |||
79 | const char *luaX_token2str (LexState *ls, int token) { | 79 | const char *luaX_token2str (LexState *ls, int token) { |
80 | if (token < FIRST_RESERVED) { /* single-byte symbols? */ | 80 | if (token < FIRST_RESERVED) { /* single-byte symbols? */ |
81 | lua_assert(token == cast_uchar(token)); | 81 | lua_assert(token == cast_uchar(token)); |
82 | return luaO_pushfstring(ls->L, LUA_QL("%c"), token); | 82 | return luaO_pushfstring(ls->L, "'%c'", token); |
83 | } | 83 | } |
84 | else { | 84 | else { |
85 | const char *s = luaX_tokens[token - FIRST_RESERVED]; | 85 | const char *s = luaX_tokens[token - FIRST_RESERVED]; |
86 | if (token < TK_EOS) /* fixed format (symbols and reserved words)? */ | 86 | if (token < TK_EOS) /* fixed format (symbols and reserved words)? */ |
87 | return luaO_pushfstring(ls->L, LUA_QS, s); | 87 | return luaO_pushfstring(ls->L, "'%s'", s); |
88 | else /* names, strings, and numerals */ | 88 | else /* names, strings, and numerals */ |
89 | return s; | 89 | return s; |
90 | } | 90 | } |
@@ -96,7 +96,7 @@ static const char *txtToken (LexState *ls, int token) { | |||
96 | case TK_NAME: case TK_STRING: | 96 | case TK_NAME: case TK_STRING: |
97 | case TK_FLT: case TK_INT: | 97 | case TK_FLT: case TK_INT: |
98 | save(ls, '\0'); | 98 | save(ls, '\0'); |
99 | return luaO_pushfstring(ls->L, LUA_QS, luaZ_buffer(ls->buff)); | 99 | return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff)); |
100 | default: | 100 | default: |
101 | return luaX_token2str(ls, token); | 101 | return luaX_token2str(ls, token); |
102 | } | 102 | } |