diff options
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.59 2011/11/30 12:43:51 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.60 2012/01/20 18:35:36 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 | */ |
@@ -67,7 +67,7 @@ void luaX_init (lua_State *L) { | |||
67 | for (i=0; i<NUM_RESERVED; i++) { | 67 | for (i=0; i<NUM_RESERVED; i++) { |
68 | TString *ts = luaS_new(L, luaX_tokens[i]); | 68 | TString *ts = luaS_new(L, luaX_tokens[i]); |
69 | luaS_fix(ts); /* reserved words are never collected */ | 69 | luaS_fix(ts); /* reserved words are never collected */ |
70 | ts->tsv.reserved = cast_byte(i+1); /* reserved word */ | 70 | ts->tsv.extra = cast_byte(i+1); /* reserved word */ |
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
@@ -491,8 +491,8 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
491 | ts = luaX_newstring(ls, luaZ_buffer(ls->buff), | 491 | ts = luaX_newstring(ls, luaZ_buffer(ls->buff), |
492 | luaZ_bufflen(ls->buff)); | 492 | luaZ_bufflen(ls->buff)); |
493 | seminfo->ts = ts; | 493 | seminfo->ts = ts; |
494 | if (ts->tsv.reserved > 0) /* reserved word? */ | 494 | if (isreserved(ts)) /* reserved word? */ |
495 | return ts->tsv.reserved - 1 + FIRST_RESERVED; | 495 | return ts->tsv.extra - 1 + FIRST_RESERVED; |
496 | else { | 496 | else { |
497 | return TK_NAME; | 497 | return TK_NAME; |
498 | } | 498 | } |