- fix: lambda expression is not correctly handled.
This commit is contained in:
parent
d37652a236
commit
c304f3f8a0
1
NEWS.md
1
NEWS.md
|
@ -4,6 +4,7 @@ Red Panda C++ Version 2.22
|
|||
- fix: Double-clicking on touchpad can't select current word.
|
||||
- fix: foreach-loops are not correctly parsed.
|
||||
- fix: '^' is not correctly handled as operator.
|
||||
- fix: lambda expression is not correctly handled.
|
||||
|
||||
Red Panda C++ Version 2.21
|
||||
|
||||
|
|
|
@ -2516,7 +2516,7 @@ void CppParser::handleLambda(int index, int endIndex)
|
|||
return;
|
||||
}
|
||||
int bodyEnd = mTokenizer[bodyStart]->matchIndex;
|
||||
if (bodyEnd>=endIndex) {
|
||||
if (bodyEnd>endIndex) {
|
||||
return;
|
||||
}
|
||||
PStatement lambdaBlock = addStatement(
|
||||
|
@ -3981,7 +3981,7 @@ void CppParser::internalParse(const QString &fileName)
|
|||
if (mTokenizer.tokenCount() == 0)
|
||||
return;
|
||||
#ifdef QT_DEBUG
|
||||
mTokenizer.dumpTokens(QString("r:\\tokens-%1.txt").arg(extractFileName(fileName)));
|
||||
// mTokenizer.dumpTokens(QString("r:\\tokens-%1.txt").arg(extractFileName(fileName)));
|
||||
#endif
|
||||
#ifdef QT_DEBUG
|
||||
mLastIndex = -1;
|
||||
|
@ -3994,8 +3994,8 @@ void CppParser::internalParse(const QString &fileName)
|
|||
}
|
||||
// qDebug()<<"parse"<<timer.elapsed();
|
||||
#ifdef QT_DEBUG
|
||||
mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName)));
|
||||
mStatementList.dump(QString("r:\\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)));
|
||||
#endif
|
||||
//reduce memory usage
|
||||
internalClear();
|
||||
|
|
Loading…
Reference in New Issue