mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
keep 'seminfo->ts' even for reserved words, just in case
(some lhf's tools need this)
This commit is contained in:
parent
bcce769d29
commit
54771c5afa
4
llex.c
4
llex.c
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user