Update syntax highlighter upon processor change
MODIFY
src/edittab.cpp
src/edittab.cpp
@@ -197,6 +197,10 @@ void EditTab::createAssemblerForCurrentISA() {
} else {
Q_UNREACHABLE();
}
+
+ // Notify the assembler change to the code editor - opcodes might have been added or removed which must be reflected
+ // in the syntax highlighter
+ m_ui->codeEditor->setSourceType(m_currentSourceType, m_assembler->getOpcodes());
}
void EditTab::onProcessorChanged() {

MODIFY
src/edittab.h
src/edittab.h
@@ -92,7 +92,7 @@ private:
std::shared_ptr<Program> m_activeProgram;
std::shared_ptr<AssemblerTmp::Errors> m_sourceErrors;
- SourceType m_currentSourceType;
+ SourceType m_currentSourceType = SourceType::Assembly;
bool m_editorEnabled = true;
};

Update syntax highlighter upon processor change