Merge pull request #74567 from Garym3/3-to-4-converter-brace-aggregate-fix
Fix braces handling when parsing method arguments on project conversion
This commit is contained in:
commit
49dedd6ce4
1 changed files with 5 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue