diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-20 09:19:33 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-20 09:19:33 +0200 |
commit | 49dedd6ce48b14bff89f0683a19e5904af930701 (patch) | |
tree | f491e1429876c9f0f3e467c0a40b96966f9b8e6d /editor/project_converter_3_to_4.cpp | |
parent | 217a20a8a09bc305674bf3790c29cf2e8e257553 (diff) | |
parent | 4aecba68e347a31943dd864a5cb4b8628f351665 (diff) | |
download | redot-engine-49dedd6ce48b14bff89f0683a19e5904af930701.tar.gz |
Merge pull request #74567 from Garym3/3-to-4-converter-brace-aggregate-fix
Fix braces handling when parsing method arguments on project conversion
Diffstat (limited to 'editor/project_converter_3_to_4.cpp')
-rw-r--r-- | editor/project_converter_3_to_4.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index c5c2c9db51..9008b6a600 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -1274,14 +1274,17 @@ Vector<String> ProjectConverter3To4::parse_arguments(const String &line) { for (int current_index = 0; current_index < string_size; current_index++) { char32_t character = line.get(current_index); switch (character) { - case '(': { + case '(': + case '[': + case '{': { parts_counter++; if (parts_counter == 1 && !is_inside_string) { start_part = current_index; } break; }; - case ')': { + case ')': + case '}': { parts_counter--; if (parts_counter == 0 && !is_inside_string) { parts.append(line.substr(start_part + 1, current_index - start_part - 1)); @@ -1289,13 +1292,6 @@ Vector<String> ProjectConverter3To4::parse_arguments(const String &line) { } break; }; - case '[': { - parts_counter++; - if (parts_counter == 1 && !is_inside_string) { - start_part = current_index; - } - break; - }; case ']': { parts_counter--; if (parts_counter == 0 && !is_inside_string) { |