diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:50:43 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:50:43 -0300 |
| commit | fded0b4a844990b1a6d0cda1aba25df33eb5f46f (patch) | |
| tree | 4f12b7359ed4d8d9d46589d5708de12992ad206b /lparser.c | |
| parent | 3b9dd52be02fd43c598f4adb6fa7844e6a573923 (diff) | |
| download | lua-fded0b4a844990b1a6d0cda1aba25df33eb5f46f.tar.gz lua-fded0b4a844990b1a6d0cda1aba25df33eb5f46f.tar.bz2 lua-fded0b4a844990b1a6d0cda1aba25df33eb5f46f.zip | |
Remove compat code in parser when not needed
Diffstat (limited to 'lparser.c')
| -rw-r--r-- | lparser.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -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; |
