diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-08-22 13:47:41 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-08-22 13:47:41 +0200 |
commit | 6c09f661b83dd13a8403243c1441efa5c4900538 (patch) | |
tree | fe32eed92f284d08455461c02c158226d760ac4c /qtmips_asm/simpleasm.h | |
parent | a385be02219abc1fd751908e559286dc1a370e12 (diff) | |
download | qtmips-6c09f661b83dd13a8403243c1441efa5c4900538.tar.gz qtmips-6c09f661b83dd13a8403243c1441efa5c4900538.tar.bz2 qtmips-6c09f661b83dd13a8403243c1441efa5c4900538.zip |
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 <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_asm/simpleasm.h')
-rw-r--r-- | qtmips_asm/simpleasm.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 <QString> -#include <QStringList> +#include <QString> +#include <QStringList> #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; |