feat: updated engine version to 4.4-rc1

This commit is contained in:
Sara 2025-02-23 14:38:14 +01:00
parent ee00efde1f
commit 21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions

View file

@ -30,7 +30,6 @@
#include "syntax_highlighter.h"
#include "core/object/script_language.h"
#include "scene/gui/text_edit.h"
Dictionary SyntaxHighlighter::get_line_syntax_highlighting(int p_line) {
@ -145,7 +144,7 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
in_region = color_region_cache[p_line - 1];
}
const String &str = text_edit->get_line(p_line);
const String &str = text_edit->get_line_with_ime(p_line);
const int line_length = str.length();
Color prev_color;
@ -205,7 +204,7 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
if (end_key_length == 0 || color_regions[c].line_only || from + end_key_length > line_length) {
if (from + end_key_length > line_length && (color_regions[in_region].start_key == "\"" || color_regions[in_region].start_key == "\'")) {
// If it's key length and there is a '\', dont skip to highlight esc chars.
if (str.find("\\", from) >= 0) {
if (str.find_char('\\', from) >= 0) {
break;
}
}
@ -242,7 +241,7 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
for (; from < line_length; from++) {
if (line_length - from < end_key_length) {
// Don't break if '\' to highlight esc chars.
if (!is_string || str.find("\\", from) < 0) {
if (!is_string || str.find_char('\\', from) < 0) {
break;
}
}
@ -303,12 +302,12 @@ Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
}
// Check for dot or underscore or 'x' for hex notation in floating point number or 'e' for scientific notation.
if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f' || str[j] == 'e' || (uint_suffix_enabled && str[j] == 'u')) && !in_word && prev_is_number && !is_number) {
if ((str[j] == '.' || str[j] == 'x' || str[j] == 'X' || str[j] == '_' || str[j] == 'f' || str[j] == 'e' || str[j] == 'E' || (uint_suffix_enabled && str[j] == 'u')) && !in_word && prev_is_number && !is_number) {
is_number = true;
is_a_symbol = false;
is_char = false;
if (str[j] == 'x' && str[j - 1] == '0') {
if ((str[j] == 'x' || str[j] == 'X') && str[j - 1] == '0') {
is_hex_notation = true;
}
}
@ -442,7 +441,6 @@ Color CodeHighlighter::get_keyword_color(const String &p_keyword) const {
}
void CodeHighlighter::set_keyword_colors(const Dictionary p_keywords) {
keywords.clear();
keywords = p_keywords;
clear_highlighting_cache();
}
@ -476,7 +474,6 @@ Color CodeHighlighter::get_member_keyword_color(const String &p_member_keyword)
}
void CodeHighlighter::set_member_keyword_colors(const Dictionary &p_member_keywords) {
member_keywords.clear();
member_keywords = p_member_keywords;
clear_highlighting_cache();
}