- enhancement: Improve lambda support.

This commit is contained in:
Roy Qu 2024-03-22 18:56:02 +08:00
parent 470bd9cee0
commit 517fdbdecc
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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()<<index<<bodyStart<<maxIndex;
if (bodyStart>=maxIndex) {
return;
}
int bodyEnd = mTokenizer[bodyStart]->matchIndex;
qDebug()<<"end"<<index<<bodyEnd<<maxIndex;
if (bodyEnd>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;