- fix: In sdcc project, sdcc keywords are not in completion suggest list.
This commit is contained in:
parent
8c889a3a1b
commit
d8b467b867
1
NEWS.md
1
NEWS.md
|
@ -146,6 +146,7 @@ Red Panda C++ Version 2.27
|
|||
- fix: project options -> compiler set -> static link & auto convert charset options not correctly loaded.
|
||||
- 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.
|
||||
|
||||
Red Panda C++ Version 2.26
|
||||
- enhancement: Code suggestion for embedded std::vectors.
|
||||
|
|
|
@ -3152,11 +3152,14 @@ void Editor::initParser()
|
|||
ParserLanguage Editor::calcParserLanguage()
|
||||
{
|
||||
#ifdef ENABLE_SDCC
|
||||
if (!inProject()
|
||||
&& pSettings->compilerSets().defaultSet()
|
||||
&& pSettings->compilerSets().defaultSet()->compilerType()==CompilerType::SDCC) {
|
||||
return ParserLanguage::SDCC;
|
||||
Settings::PCompilerSet pSet;
|
||||
if (inProject()) {
|
||||
pSet = pSettings->compilerSets().getSet(mProject->options().compilerSet);
|
||||
} else if (!inProject()) {
|
||||
pSet = pSettings->compilerSets().defaultSet();
|
||||
}
|
||||
if (pSet && pSet->compilerType()==CompilerType::SDCC)
|
||||
return ParserLanguage::SDCC;
|
||||
#endif
|
||||
return mUseCppSyntax?ParserLanguage::CPlusPlus:ParserLanguage::C;
|
||||
}
|
||||
|
|
|
@ -241,6 +241,7 @@ void resetCppParser(std::shared_ptr<CppParser> parser, int compilerSetIndex)
|
|||
parser->setEnabled(true);
|
||||
parser->setParseGlobalHeaders(true);
|
||||
parser->setParseLocalHeaders(true);
|
||||
|
||||
// Set options depending on the current compiler set
|
||||
if (compilerSetIndex<0) {
|
||||
compilerSetIndex=pSettings->compilerSets().defaultIndex();
|
||||
|
|
Loading…
Reference in New Issue