- fix #388: Temp object + member function call is wrongly parsed as constructor.
This commit is contained in:
parent
3887b9387d
commit
96c4e95172
1
NEWS.md
1
NEWS.md
|
@ -148,6 +148,7 @@ Red Panda C++ Version 2.27
|
||||||
- fix: Name of the macro for project private resource header is not correct.
|
- fix: Name of the macro for project private resource header is not correct.
|
||||||
- fix: In sdcc project, sdcc keywords are not in completion suggest list.
|
- fix: In sdcc project, sdcc keywords are not in completion suggest list.
|
||||||
- fix: In sdcc project, parser are not correctly inited as sdcc parser.
|
- fix: In sdcc project, parser are not correctly inited as sdcc parser.
|
||||||
|
- fix: Temp object + member function call is wrongly parsed as constructor.
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
- enhancement: Code suggestion for embedded std::vectors.
|
- enhancement: Code suggestion for embedded std::vectors.
|
||||||
|
|
|
@ -2332,6 +2332,13 @@ void CppParser::checkAndHandleMethodOrVar(KeywordType keywordType, int maxIndex)
|
||||||
//Won't implement: ignore function decl like int (text)(int x) { };
|
//Won't implement: ignore function decl like int (text)(int x) { };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//it's a chain function call
|
||||||
|
if (mTokenizer[indexAfter]->text == "."
|
||||||
|
|| mTokenizer[indexAfter]->text == "->"
|
||||||
|
|| mTokenizer[indexAfter]->text == "::" ) {
|
||||||
|
mIndex = indexOfNextPeriodOrSemicolon(indexAfter, maxIndex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
//it's not a function define
|
//it's not a function define
|
||||||
if (mTokenizer[indexAfter]->text == ',') {
|
if (mTokenizer[indexAfter]->text == ',') {
|
||||||
// var decl with init
|
// var decl with init
|
||||||
|
|
Loading…
Reference in New Issue