commit eecc1491f39947d575fea42ec99864d9625d6e87
parent 7ea68d84c4f7dbf82503a150a5b470808ad186ad
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 5 Dec 2012 17:56:35 -0200
added some comments
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llex.c b/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.60 2012/01/20 18:35:36 roberto Exp roberto $
+** $Id: llex.c,v 2.61 2012/01/23 23:05:51 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -73,16 +73,16 @@ void luaX_init (lua_State *L) {
const char *luaX_token2str (LexState *ls, int token) {
- if (token < FIRST_RESERVED) {
+ if (token < FIRST_RESERVED) { /* single-byte symbols? */
lua_assert(token == cast(unsigned char, token));
return (lisprint(token)) ? luaO_pushfstring(ls->L, LUA_QL("%c"), token) :
luaO_pushfstring(ls->L, "char(%d)", token);
}
else {
const char *s = luaX_tokens[token - FIRST_RESERVED];
- if (token < TK_EOS)
+ if (token < TK_EOS) /* fixed format (symbols and reserved words)? */
return luaO_pushfstring(ls->L, LUA_QS, s);
- else
+ else /* names, strings, and numerals */
return s;
}
}