diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-05-07 00:52:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 00:52:50 +0200 |
commit | 8962d36bb1c249d608f2d2855f7b8258b0ed6309 (patch) | |
tree | c3e00d103d7b0fd27c95292bc1752ba2b611f42d /modules/mono/csharp_script.cpp | |
parent | 49b556a9f112be63b1c188dfb7ba055db7118471 (diff) | |
parent | e905e8f145ef5d91aa6f8200bf415569e28d5967 (diff) |
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 09f3ea1f50..ffb04bfd37 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -304,6 +304,26 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const { } } +bool CSharpLanguage::is_control_flow_keyword(String p_keyword) const { + return p_keyword == "break" || + p_keyword == "case" || + p_keyword == "catch" || + p_keyword == "continue" || + p_keyword == "default" || + p_keyword == "do" || + p_keyword == "else" || + p_keyword == "finally" || + p_keyword == "for" || + p_keyword == "foreach" || + p_keyword == "goto" || + p_keyword == "if" || + p_keyword == "return" || + p_keyword == "switch" || + p_keyword == "throw" || + p_keyword == "try" || + p_keyword == "while"; +} + void CSharpLanguage::get_comment_delimiters(List<String> *p_delimiters) const { p_delimiters->push_back("//"); // single-line comment p_delimiters->push_back("/* */"); // delimited comment |