- 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: No icons for inherited class private members.
- fix: Ctrl+Return insert linebreak shouldn't scroll unnecessarilly. - fix: Ctrl+Return insert linebreak shouldn't scroll unnecessarilly.
- enhancement: Move caret to line begin would scroll to the begin if possible. - 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 Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors. - enhancement: Code suggestion for embedded std::vectors.

View File

@ -2249,8 +2249,8 @@ void CppParser::checkAndHandleMethodOrVar(KeywordType keywordType)
// function call, skip it // function call, skip it
mIndex=moveToEndOfStatement(mIndex,true); mIndex=moveToEndOfStatement(mIndex,true);
} }
} else if (mTokenizer[mIndex]->text.startsWith('*') } else if (mTokenizer[mIndex]->text == "*"
|| mTokenizer[mIndex]->text.startsWith('&') || mTokenizer[mIndex]->text == "&"
|| mTokenizer[mIndex]->text=="::" || mTokenizer[mIndex]->text=="::"
|| tokenIsIdentifier(mTokenizer[mIndex]->text) || tokenIsIdentifier(mTokenizer[mIndex]->text)
) { ) {
@ -3930,8 +3930,8 @@ void CppParser::handleStructs(bool isTypedef)
int pos = mTokenizer[i]->text.indexOf('['); int pos = mTokenizer[i]->text.indexOf('[');
command += mTokenizer[i]->text.mid(0,pos) + ' '; command += mTokenizer[i]->text.mid(0,pos) + ' ';
args = mTokenizer[i]->text.mid(pos); args = mTokenizer[i]->text.mid(pos);
} else if (mTokenizer[i]->text.front() == '*' } else if (mTokenizer[i]->text == "*"
|| mTokenizer[i]->text.front() == '&') { // do not add spaces after pointer operator || mTokenizer[i]->text == "&") { // do not add spaces after pointer operator
command += mTokenizer[i]->text; command += mTokenizer[i]->text;
} else { } else {
command += mTokenizer[i]->text + ' '; command += mTokenizer[i]->text + ' ';
@ -4575,8 +4575,8 @@ void CppParser::internalParse(const QString &fileName)
handleInheritances(); handleInheritances();
// qDebug()<<"parse"<<timer.elapsed(); // qDebug()<<"parse"<<timer.elapsed();
#ifdef QT_DEBUG #ifdef QT_DEBUG
// mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName))); // mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName)));
// mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName))); // mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName)));
#endif #endif
//reduce memory usage //reduce memory usage
internalClear(); internalClear();