From fded0b4a844990b1a6d0cda1aba25df33eb5f46f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 13 May 2025 11:50:43 -0300 Subject: Remove compat code in parser when not needed --- lparser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lparser.c') 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) { gotostat(ls, line); break; } +#if defined(LUA_COMPAT_GLOBAL) case TK_NAME: { /* compatibility code to parse global keyword when "global" is not reserved */ @@ -2008,7 +2009,9 @@ static void statement (LexState *ls) { break; } } /* else... */ - } /* FALLTHROUGH */ + } +#endif + /* FALLTHROUGH */ default: { /* stat -> func | assignment */ exprstat(ls); break; -- cgit v1.2.3-55-g6feb