aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/llex.c b/llex.c
index 54213e9c..f0bcc514 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.39 1999/09/06 13:55:09 roberto Exp roberto $ 2** $Id: llex.c,v 1.40 1999/10/04 17:51:04 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*/
@@ -37,7 +37,7 @@ void luaX_init (void) {
37 int i; 37 int i;
38 for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) { 38 for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) {
39 TaggedString *ts = luaS_new(reserved[i]); 39 TaggedString *ts = luaS_new(reserved[i]);
40 ts->marked = FIRST_RESERVED+i; /* reserved word (always > 255) */ 40 ts->marked = RESERVEDMARK+i; /* reserved word */
41 } 41 }
42} 42}
43 43
@@ -426,8 +426,8 @@ int luaX_lex (LexState *LS) {
426 } while (isalnum(LS->current) || LS->current == '_'); 426 } while (isalnum(LS->current) || LS->current == '_');
427 save('\0'); 427 save('\0');
428 ts = luaS_new(L->Mbuffer+L->Mbuffbase); 428 ts = luaS_new(L->Mbuffer+L->Mbuffbase);
429 if (ts->marked >= FIRST_RESERVED) 429 if (ts->marked >= RESERVEDMARK) /* reserved word? */
430 return ts->marked; /* reserved word */ 430 return ts->marked-RESERVEDMARK+FIRST_RESERVED;
431 LS->seminfo.ts = ts; 431 LS->seminfo.ts = ts;
432 return NAME; 432 return NAME;
433 } 433 }