diff --git a/NEWS.md b/NEWS.md index a24d9f90..fe74dadd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ Red Panda C++ Version 2.15 - fix: Static class members is not correctly recognized as static. + - fix: Function with reference type return value is not correctly parsed. Red Panda C++ Version 2.14 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index e2a52239..a1c13086 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -3811,7 +3811,7 @@ void CppParser::internalParse(const QString &fileName) QStringList preprocessResult = mPreprocessor.result(); #ifdef QT_DEBUG -// stringsToFile(mPreprocessor.result(),QString("r:\\preprocess-%1.txt").arg(extractFileName(fileName))); + stringsToFile(mPreprocessor.result(),QString("r:\\preprocess-%1.txt").arg(extractFileName(fileName))); // mPreprocessor.dumpDefinesTo("r:\\defines.txt"); // mPreprocessor.dumpIncludesListTo("r:\\includes.txt"); #endif @@ -3825,7 +3825,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; @@ -3836,8 +3836,8 @@ void CppParser::internalParse(const QString &fileName) break; } #ifdef QT_DEBUG -// mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName))); -// mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName))); + mStatementList.dumpAll(QString("r:\\all-stats-%1.txt").arg(extractFileName(fileName))); + mStatementList.dump(QString("r:\\stats-%1.txt").arg(extractFileName(fileName))); #endif //reduce memory usage internalClear(); diff --git a/RedPandaIDE/parser/cpptokenizer.cpp b/RedPandaIDE/parser/cpptokenizer.cpp index 19f8c42b..ac66f97e 100644 --- a/RedPandaIDE/parser/cpptokenizer.cpp +++ b/RedPandaIDE/parser/cpptokenizer.cpp @@ -537,7 +537,7 @@ bool CppTokenizer::isPreprocessor() bool CppTokenizer::isWord() { - bool result = isLetterChar(*mCurrent); + bool result = isIdentChar(*mCurrent); if (result && (*(mCurrent+1) == '"')) result = false; return result;