diff --git a/NEWS.md b/NEWS.md index fe243d6d..8d673b49 100644 --- a/NEWS.md +++ b/NEWS.md @@ -77,6 +77,7 @@ Red Panda C++ Version 2.27 - enhancement: Show "std::function" in the completion list. - enhancement: Improvement in italic font support. - fix: History not correctly loaded with up/down arrow key in the debug console. + - enhancement: Improve lambda support. Red Panda C++ Version 2.26 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index d3d97abb..c19b71d7 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -2894,12 +2894,10 @@ void CppParser::handleLambda(int index, int maxIndex) int argEnd= mTokenizer[argStart]->matchIndex; //TODO: parse captures int bodyStart=indexOfNextLeftBrace(argEnd+1, maxIndex); - qDebug()<=maxIndex) { return; } int bodyEnd = mTokenizer[bodyStart]->matchIndex; - qDebug()<<"end"<maxIndex) { return; } @@ -6414,9 +6412,11 @@ int CppParser::skipAssignment(int index, int maxIndex) switch(mTokenizer[index]->text[0].unicode()) { case ';': case ',': - case '{': + case '}': + case ')': stop=true; break; + case '{': case '(': index = mTokenizer[index]->matchIndex+1; break;