Skip to content

Commit e428f61

Browse files
committed
Update PHP Lexer Keyword Set
Expanded the PHP lexer keyword set to include the broader and more modern list of terms such as traits, namespaces, match expressions, and other language constructs, ensuring the lexer recognizes recent additions to PHP syntax. **Generated by CodeLite** Signed-off-by: Eran Ifrah <eran@codelite.org>
1 parent b18830f commit e428f61

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Plugin/ColoursAndFontsManager.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,14 +1027,11 @@ LexerConf::Ptr_t ColoursAndFontsManager::DoAddLexer(JSONItem json)
10271027
// Set the JavaScript keywords
10281028
if (lexer->GetName() == "php" && !lexer->GetKeyWords(1).Contains("instanceof")) {
10291029
lexer->SetKeyWords(
1030-
"break do instanceof typeof case else new var catch finally return void continue for switch while "
1031-
"debugger function this with default if throw delete in try abstract export interface static "
1032-
"boolean extends "
1033-
"long super"
1034-
"byte final native synchronized char float package throws class goto private transient const "
1035-
"implements protected "
1036-
" volatile double import public enum "
1037-
"int short null true false",
1030+
"abstract and array as break callable case catch class clone const continue declare default die do echo "
1031+
"else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exit extends final finally "
1032+
"fn for foreach from function global goto if implements include include_once instanceof insteadof "
1033+
"interface isset list match namespace new or print private protected public readonly require require_once "
1034+
"return static switch throw trait try unset use var while xor yield",
10381035
0);
10391036
}
10401037

0 commit comments

Comments
 (0)