From fccadba4b54f8e13c8b9cfc97307f53931496936 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 20 Jun 2001 18:07:57 -0300 Subject: new reserved words `in' and `global' --- lparser.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index fa6ada93..28f0c4b8 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.148 2001/06/11 14:56:42 roberto Exp roberto $ +** $Id: lparser.c,v 1.149 2001/06/12 14:36:48 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -960,12 +960,7 @@ static void forlist (LexState *ls, TString *indexname) { TString *valname; check(ls, l_c(',')); valname = str_checkname(ls); - /* next test is dirty, but avoids `in' being a reserved word */ - check_condition(ls, - (ls->t.token == TK_NAME && - ls->t.seminfo.ts == luaS_newliteral(ls->L, l_s("in"))), - l_s("`in' expected")); - next(ls); /* skip `in' */ + check(ls, TK_IN); exp1(ls); /* table */ new_localvarstr(ls, l_s("(table)"), 0); new_localvarstr(ls, l_s("(index)"), 1); -- cgit v1.2.3-55-g6feb