diff --git a/NEWS.md b/NEWS.md index 56caea43..a71895aa 100644 --- a/NEWS.md +++ b/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 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 4eebb2d4..5af70618 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -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"<