added "beq" command

This commit is contained in:
black
2025-07-08 15:18:00 +02:00
parent f896f82db8
commit 6e65fe88fc
6 changed files with 76 additions and 32 deletions

View File

@@ -15,9 +15,7 @@ class ProgramLoader {
private:
/**
* Der private Konstruktor für ProgramLoader
*
* @param path Der Pfad zur .txt Quelldatei des Programmes
*/
* */
explicit ProgramLoader() = default;
std::map<std::string, std::streampos> m_labels;
@@ -35,7 +33,6 @@ public:
/**
* Gibt die Singleton Instanz des ProgramLoaders zurück
*
* @param program_path Der Pfad zur .txt Quelldatei des Programmes
* @return ProgramLoader Instanz
*/
static ProgramLoader *getInstance();
@@ -52,6 +49,14 @@ public:
* Durchscucht das aktuelle Programm nach Labeln und speichert diese zusammen mit den Zeilennummern in einer Map
*/
void indexFile(std::ifstream &m_programFile);
/**
* Gibt die Position des Streams (virtuellen Lesekopfes) im aktuellen Quellcode zurück
*
* @param label Das Label, dessen Streamposition zurückgegeben werden soll
* @return Die Streamposition des angegebenen Labels
*/
[[nodiscard]] std::streampos getStreamPosition(const std::string &label) const;
};