mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
This commit is contained in:
parent
130ecf0c9f
commit
a38b447413
24 changed files with 119 additions and 8 deletions
|
@ -289,6 +289,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue