diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:51 -0200 |
commit | 291f564485d8968fc7b0d043dda5ff91a7ce604b (patch) | |
tree | 4949c3a32f797f1188963006eaafdab504649f26 /llex.c | |
parent | 9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb (diff) | |
download | lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.tar.gz lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.tar.bz2 lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.zip |
field 'reserved' -> 'extra' (may be used for other purposes too)
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 | } |