diff options
author | Garym3 <olivier.lefebvre96@gmail.com> | 2023-06-19 22:46:42 +0200 |
---|---|---|
committer | Garym <olivier.lefebvre96@gmail.com> | 2023-06-20 07:20:35 +0200 |
commit | 4aecba68e347a31943dd864a5cb4b8628f351665 (patch) | |
tree | 446a54df41ef317c7ec182f9d963593dfdced2ff /editor/project_converter_3_to_4.cpp | |
parent | 013a45706897af989703b944c7cd5f4f58a6c060 (diff) | |
download | redot-engine-4aecba68e347a31943dd864a5cb4b8628f351665.tar.gz |
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 a1dfbac719..bddb19ac02 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -1217,14 +1217,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)); @@ -1232,13 +1235,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) { |