From c29e056a8e555015d8a092487a7db2e9d0e65f30 Mon Sep 17 00:00:00 2001 From: Jun Tajima <56220423+tjmprm77@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:00:11 +0900 Subject: [PATCH] Update PHP syntax highlighting keyword list. (#2265) - Add some keywords defined in PHP 8.3. - Keywords are from https://www.php.net/manual/en/reserved.php --- Externals/crystaledit/editlib/parsers/php.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Externals/crystaledit/editlib/parsers/php.cpp b/Externals/crystaledit/editlib/parsers/php.cpp index 3aee813ea9b..61f64ef238c 100644 --- a/Externals/crystaledit/editlib/parsers/php.cpp +++ b/Externals/crystaledit/editlib/parsers/php.cpp @@ -85,6 +85,7 @@ static const tchar_t * s_apszPhpKeywordList[] = _T ("private"), _T ("protected"), _T ("public"), + _T ("readonly"), // as of PHP 8.1.0 _T ("require"), _T ("require_once"), _T ("return"), @@ -168,6 +169,7 @@ static const tchar_t * s_apszPredefinedConstantList[] = _T ("PEAR_INSTALL_DIR"), _T ("PHP_BINARY"), _T ("PHP_BINDIR"), + _T ("PHP_CLI_PROCESS_TITLE"), _T ("PHP_CONFIG_FILE_PATH"), _T ("PHP_CONFIG_FILE_SCAN_DIR"), _T ("PHP_DATADIR"), @@ -201,7 +203,12 @@ static const tchar_t * s_apszPredefinedConstantList[] = _T ("PHP_WINDOWS_EVENT_CTRL_BREAK"), // as of PHP 7.4.0 _T ("PHP_WINDOWS_EVENT_CTRL_C"), // as of PHP 7.4.0 _T ("PHP_ZTS"), // as of PHP 5.2.7 + _T ("STDERR"), + _T ("STDIN"), + _T ("STDOUT"), _T ("true"), + _T ("ZEND_DEBUG_BUILD"), + _T ("ZEND_THREAD_SAFE"), }; // Reserved words @@ -209,11 +216,13 @@ static const tchar_t * s_apszPredefinedConstantList[] = static const tchar_t * s_apszReservedWordList[] = { _T ("bool"), // as of PHP 7 + _T ("enum"), // _T ("false"), // as of PHP 7. This is also defined as a predefined constant, so comment it out. _T ("float"), // as of PHP 7 _T ("int"), // as of PHP 7 _T ("iterable"), // as of PHP 7.1 _T ("mixed"), // as of PHP 7 + _T ("never"), // as of PHP 8.1 // _T ("null"), // as of PHP 7. This is also defined as a predefined constant, so comment it out. _T ("numeric"), // as of PHP 7 _T ("object"), // as of PHP 7.2