diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-11 08:49:53 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-11 08:49:53 -0200 |
commit | d67462639223159372371a24c41e87376c8b3569 (patch) | |
tree | 82ff7ef2b92f42001ce23386ece5bc76ae09b8b5 | |
parent | 7a40cdbda0a171da223094208dd3c6e3eca13922 (diff) | |
download | lua-d67462639223159372371a24c41e87376c8b3569.tar.gz lua-d67462639223159372371a24c41e87376c8b3569.tar.bz2 lua-d67462639223159372371a24c41e87376c8b3569.zip |
compatibility with '%' syntax is optional
-rw-r--r-- | lparser.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.203 2002/12/19 11:11:55 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.204 2003/02/11 10:46:24 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -644,12 +644,14 @@ static void prefixexp (LexState *ls, expdesc *v) { | |||
644 | singlevar(ls, v, 1); | 644 | singlevar(ls, v, 1); |
645 | return; | 645 | return; |
646 | } | 646 | } |
647 | #ifdef LUA_COMPATUPSYNTAX | ||
647 | case '%': { /* for compatibility only */ | 648 | case '%': { /* for compatibility only */ |
648 | next(ls); /* skip `%' */ | 649 | next(ls); /* skip `%' */ |
649 | singlevar(ls, v, 1); | 650 | singlevar(ls, v, 1); |
650 | check_condition(ls, v->k == VUPVAL, "global upvalues are obsolete"); | 651 | check_condition(ls, v->k == VUPVAL, "global upvalues are obsolete"); |
651 | return; | 652 | return; |
652 | } | 653 | } |
654 | #endif | ||
653 | default: { | 655 | default: { |
654 | luaX_syntaxerror(ls, "unexpected symbol"); | 656 | luaX_syntaxerror(ls, "unexpected symbol"); |
655 | return; | 657 | return; |