- fix: '*=' is treadted as '*' when parsing.

This commit is contained in:
Roy Qu 2024-03-21 15:13:58 +08:00
parent 4c12fadae3
commit e308ccb629
2 changed files with 9 additions and 6 deletions

View File

@ -65,6 +65,9 @@ Red Panda C++ Version 2.27
- fix: No icons for inherited class private members.
- fix: Ctrl+Return insert linebreak shouldn't scroll unnecessarilly.
- enhancement: Move caret to line begin would scroll to the begin if possible.
- fix: Filename in tables in the debug panel are not correctly eroded.
- enhancement: Tooltip info for the stacktrace table in the debug panel.
- fix: '*=' is treadted as '*' when parsing.
Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors.

View File

@ -2249,8 +2249,8 @@ void CppParser::checkAndHandleMethodOrVar(KeywordType keywordType)
// function call, skip it
mIndex=moveToEndOfStatement(mIndex,true);
}
} else if (mTokenizer[mIndex]->text.startsWith('*')
|| mTokenizer[mIndex]->text.startsWith('&')
} else if (mTokenizer[mIndex]->text == "*"
|| mTokenizer[mIndex]->text == "&"
|| mTokenizer[mIndex]->text=="::"
|| tokenIsIdentifier(mTokenizer[mIndex]->text)
) {
@ -3930,8 +3930,8 @@ void CppParser::handleStructs(bool isTypedef)
int pos = mTokenizer[i]->text.indexOf('[');
command += mTokenizer[i]->text.mid(0,pos) + ' ';
args = mTokenizer[i]->text.mid(pos);
} else if (mTokenizer[i]->text.front() == '*'
|| mTokenizer[i]->text.front() == '&') { // do not add spaces after pointer operator
} else if (mTokenizer[i]->text == "*"
|| mTokenizer[i]->text == "&") { // do not add spaces after pointer operator
command += mTokenizer[i]->text;
} else {
command += mTokenizer[i]->text + ' ';