aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lparser.c b/lparser.c
index 29022bfd..384ef690 100644
--- a/lparser.c
+++ b/lparser.c
@@ -2001,10 +2001,10 @@ static void statement (LexState *ls) {
2001 case TK_NAME: { 2001 case TK_NAME: {
2002 /* compatibility code to parse global keyword when "global" 2002 /* compatibility code to parse global keyword when "global"
2003 is not reserved */ 2003 is not reserved */
2004 if (strcmp(getstr(ls->t.seminfo.ts), "global") == 0) { 2004 if (ls->t.seminfo.ts == ls->glbn) { /* current = "global"? */
2005 int lk = luaX_lookahead(ls); 2005 int lk = luaX_lookahead(ls);
2006 if (lk == TK_NAME || lk == '*' || lk == TK_FUNCTION) { 2006 if (lk == TK_NAME || lk == '*' || lk == TK_FUNCTION) {
2007 /* 'global <name>' or 'global *' or 'global function' */ 2007 /* 'global name' or 'global *' or 'global function' */
2008 globalstatfunc(ls, line); 2008 globalstatfunc(ls, line);
2009 break; 2009 break;
2010 } 2010 }