aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llex.c2
-rw-r--r--lparser.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index edeb48fe..59d927d4 100644
--- a/llex.c
+++ b/llex.c
@@ -41,7 +41,7 @@
41#define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') 41#define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r')
42 42
43#if defined(LUA_COMPAT_GLOBAL) 43#if defined(LUA_COMPAT_GLOBAL)
44#define GLOBALLEX ".g" /* not recognizable by the scanner */ 44#define GLOBALLEX ".g" /* anything not recognizable as a name */
45#else 45#else
46#define GLOBALLEX "global" 46#define GLOBALLEX "global"
47#endif 47#endif
diff --git a/lparser.c b/lparser.c
index 242bb001..27c8a927 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1997,6 +1997,7 @@ static void statement (LexState *ls) {
1997 gotostat(ls, line); 1997 gotostat(ls, line);
1998 break; 1998 break;
1999 } 1999 }
2000#if defined(LUA_COMPAT_GLOBAL)
2000 case TK_NAME: { 2001 case TK_NAME: {
2001 /* compatibility code to parse global keyword when "global" 2002 /* compatibility code to parse global keyword when "global"
2002 is not reserved */ 2003 is not reserved */
@@ -2008,7 +2009,9 @@ static void statement (LexState *ls) {
2008 break; 2009 break;
2009 } 2010 }
2010 } /* else... */ 2011 } /* else... */
2011 } /* FALLTHROUGH */ 2012 }
2013#endif
2014 /* FALLTHROUGH */
2012 default: { /* stat -> func | assignment */ 2015 default: { /* stat -> func | assignment */
2013 exprstat(ls); 2016 exprstat(ls);
2014 break; 2017 break;