keep 'seminfo->ts' even for reserved words, just in case

(some lhf's tools need this)
This commit is contained in:
Roberto Ierusalimschy 2010-11-18 16:38:44 -02:00
parent bcce769d29
commit 54771c5afa

4
llex.c
View File

@ -1,5 +1,5 @@
/*
** $Id: llex.c,v 2.39 2010/09/13 21:49:58 roberto Exp roberto $
** $Id: llex.c,v 2.40 2010/10/25 12:24:36 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@ -471,10 +471,10 @@ static int llex (LexState *ls, SemInfo *seminfo) {
} while (lislalnum(ls->current));
ts = luaX_newstring(ls, luaZ_buffer(ls->buff),
luaZ_bufflen(ls->buff));
seminfo->ts = ts;
if (ts->tsv.reserved > 0) /* reserved word? */
return ts->tsv.reserved - 1 + FIRST_RESERVED;
else {
seminfo->ts = ts;
return TK_NAME;
}
}