- Fix: Expression that starts with full scoped variables might be treated as var definition.
This commit is contained in:
parent
f0c01e03aa
commit
d8e4c4d76b
1
NEWS.md
1
NEWS.md
|
@ -43,6 +43,7 @@ Red Panda C++ Version 2.26
|
|||
- Enhancement: add Windows arm64 package.
|
||||
- Fix: Force to use debug server when debugging with lldb-mi to fix input/output on Windows.
|
||||
- Fix: Can't goto definition/declaration into files that not saved.
|
||||
- Fix: Expression that starts with full scoped variables might be treated as var definition.
|
||||
|
||||
Red Panda C++ Version 2.25
|
||||
|
||||
|
|
|
@ -2340,6 +2340,10 @@ void CppParser::checkAndHandleMethodOrVar(KeywordType keywordType)
|
|||
mIndex++;
|
||||
} else {
|
||||
QString s = mTokenizer[mIndex]->text;
|
||||
if (!isWordChar(s.front())) {
|
||||
mIndex = indexOfNextPeriodOrSemicolon(mIndex);
|
||||
return;
|
||||
}
|
||||
if (sName.endsWith("::")) {
|
||||
sName+=s;
|
||||
} else {
|
||||
|
@ -4444,7 +4448,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;
|
||||
|
@ -6305,6 +6309,7 @@ int CppParser::indexOfNextPeriodOrSemicolon(int index, int endIndex)
|
|||
case ';':
|
||||
case ',':
|
||||
case '}':
|
||||
case ')':
|
||||
return index;
|
||||
case '(':
|
||||
index = mTokenizer[index]->matchIndex+1;
|
||||
|
|
Loading…
Reference in New Issue