- enhancement: improve parsing result for function parameters like 'Node (&node)[10]'

This commit is contained in:
Roy Qu 2023-06-21 19:30:02 +08:00
parent 35b986a358
commit 4070362cdc
2 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Red Panda C++ Version 2.23
- enhancement: improve code completion for std iterators defined with "using namespace std"
- enhancement: improve pointer calculation when inferencing type info
- enhancement: improve parsing for multiple vars defined in one line
- enhancement: improve parsing result for function parameters like 'Node (&node)[10]'
Red Panda C++ Version 2.22

View File

@ -5554,6 +5554,12 @@ void CppParser::scanMethodArgs(const PStatement& functionStatement, int argStart
QString cmd=mTokenizer[i]->text;
words.append(cmd);
i++;
} else if (mTokenizer[i]->text.startsWith("[")) {
if (!words.isEmpty()) {
int lastIdx=words.count()-1;
words[lastIdx]=words[lastIdx]+mTokenizer[i]->text;
}
i++;
} else {
i++;
}