- enhancement: Improve lambda support.
This commit is contained in:
parent
470bd9cee0
commit
517fdbdecc
1
NEWS.md
1
NEWS.md
|
@ -77,6 +77,7 @@ Red Panda C++ Version 2.27
|
||||||
- enhancement: Show "std::function" in the completion list.
|
- enhancement: Show "std::function" in the completion list.
|
||||||
- enhancement: Improvement in italic font support.
|
- enhancement: Improvement in italic font support.
|
||||||
- fix: History not correctly loaded with up/down arrow key in the debug console.
|
- fix: History not correctly loaded with up/down arrow key in the debug console.
|
||||||
|
- enhancement: Improve lambda support.
|
||||||
|
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
|
|
|
@ -2894,12 +2894,10 @@ void CppParser::handleLambda(int index, int maxIndex)
|
||||||
int argEnd= mTokenizer[argStart]->matchIndex;
|
int argEnd= mTokenizer[argStart]->matchIndex;
|
||||||
//TODO: parse captures
|
//TODO: parse captures
|
||||||
int bodyStart=indexOfNextLeftBrace(argEnd+1, maxIndex);
|
int bodyStart=indexOfNextLeftBrace(argEnd+1, maxIndex);
|
||||||
qDebug()<<index<<bodyStart<<maxIndex;
|
|
||||||
if (bodyStart>=maxIndex) {
|
if (bodyStart>=maxIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int bodyEnd = mTokenizer[bodyStart]->matchIndex;
|
int bodyEnd = mTokenizer[bodyStart]->matchIndex;
|
||||||
qDebug()<<"end"<<index<<bodyEnd<<maxIndex;
|
|
||||||
if (bodyEnd>maxIndex) {
|
if (bodyEnd>maxIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6414,9 +6412,11 @@ int CppParser::skipAssignment(int index, int maxIndex)
|
||||||
switch(mTokenizer[index]->text[0].unicode()) {
|
switch(mTokenizer[index]->text[0].unicode()) {
|
||||||
case ';':
|
case ';':
|
||||||
case ',':
|
case ',':
|
||||||
case '{':
|
case '}':
|
||||||
|
case ')':
|
||||||
stop=true;
|
stop=true;
|
||||||
break;
|
break;
|
||||||
|
case '{':
|
||||||
case '(':
|
case '(':
|
||||||
index = mTokenizer[index]->matchIndex+1;
|
index = mTokenizer[index]->matchIndex+1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue