diff --git a/NEWS.md b/NEWS.md index 7b3fee94..edb3481f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -147,6 +147,7 @@ Red Panda C++ Version 2.27 - change: Don't generate project resource files for sdcc project. - 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, parser are not correctly inited as sdcc parser. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/utils.cpp b/RedPandaIDE/utils.cpp index 25b14342..f1e2ef06 100644 --- a/RedPandaIDE/utils.cpp +++ b/RedPandaIDE/utils.cpp @@ -247,6 +247,8 @@ void resetCppParser(std::shared_ptr parser, int compilerSetIndex) compilerSetIndex=pSettings->compilerSets().defaultIndex(); } Settings::PCompilerSet compilerSet = pSettings->compilerSets().getSet(compilerSetIndex); + if (compilerSet && compilerSet->compilerType()==CompilerType::SDCC) + parser->setLanguage(ParserLanguage::SDCC); parser->clearIncludePaths(); bool isCpp = parser->language()==ParserLanguage::CPlusPlus; if (compilerSet) {