compatibility with '%' syntax is optional

This commit is contained in:
Roberto Ierusalimschy 2003-02-11 08:49:53 -02:00
parent 7a40cdbda0
commit d674626392
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lparser.c,v 1.203 2002/12/19 11:11:55 roberto Exp roberto $
** $Id: lparser.c,v 1.204 2003/02/11 10:46:24 roberto Exp roberto $
** Lua Parser
** See Copyright Notice in lua.h
*/
@ -644,12 +644,14 @@ static void prefixexp (LexState *ls, expdesc *v) {
singlevar(ls, v, 1);
return;
}
#ifdef LUA_COMPATUPSYNTAX
case '%': { /* for compatibility only */
next(ls); /* skip `%' */
singlevar(ls, v, 1);
check_condition(ls, v->k == VUPVAL, "global upvalues are obsolete");
return;
}
#endif
default: {
luaX_syntaxerror(ls, "unexpected symbol");
return;