You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
This commit is contained in:
@@ -1758,6 +1758,19 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool GDScriptLanguage::is_control_flow_keyword(String p_keyword) const {
|
||||
return p_keyword == "break" ||
|
||||
p_keyword == "continue" ||
|
||||
p_keyword == "elif" ||
|
||||
p_keyword == "else" ||
|
||||
p_keyword == "if" ||
|
||||
p_keyword == "for" ||
|
||||
p_keyword == "match" ||
|
||||
p_keyword == "pass" ||
|
||||
p_keyword == "return" ||
|
||||
p_keyword == "while";
|
||||
}
|
||||
|
||||
bool GDScriptLanguage::handles_global_class_type(const String &p_type) const {
|
||||
return p_type == "GDScript";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user