From 6c09f661b83dd13a8403243c1441efa5c4900538 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Thu, 22 Aug 2019 13:47:41 +0200 Subject: In include, use content from editor if file is already open. This allows to assemble from modified include files without need to save their content the first. Signed-off-by: Pavel Pisa --- qtmips_asm/simpleasm.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'qtmips_asm/simpleasm.h') diff --git a/qtmips_asm/simpleasm.h b/qtmips_asm/simpleasm.h index f97904d..ac06ca1 100644 --- a/qtmips_asm/simpleasm.h +++ b/qtmips_asm/simpleasm.h @@ -36,8 +36,8 @@ #ifndef SIMPLEASM_H #define SIMPLEASM_H -#include -#include +#include +#include #include "fixmatheval.h" #include "qtmipsmachine.h" #include "messagetype.h" @@ -71,11 +71,13 @@ public: void setup(machine::MemoryAccess *mem, SymbolTableDb *symtab, std::uint32_t address); bool process_line(QString line, QString filename = "", int line_number = 0, QString *error_ptr = nullptr); + virtual bool process_file(QString filename, QString *error_ptr = nullptr); bool finish(QString *error_ptr = nullptr); -private: - QStringList include_stack; +protected: bool error_occured; bool fatal_occured; +private: + QStringList include_stack; SymbolTableDb *symtab; machine::MemoryAccess *mem; machine::RelocExpressionList reloc; -- cgit v1.2.3