From ff50d328fbfafe47d614a12b32711fbddd924e11 Mon Sep 17 00:00:00 2001 From: black Date: Sun, 6 Jul 2025 11:01:35 +0200 Subject: [PATCH] added comment handling in CommandParser --- emulator/CommandParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulator/CommandParser.cpp b/emulator/CommandParser.cpp index 74f2841..b807e50 100644 --- a/emulator/CommandParser.cpp +++ b/emulator/CommandParser.cpp @@ -19,8 +19,11 @@ std::vector CommandParser::parseLine(const std::string &input) { do { /// Trenne den IStringStream bei jedem Leerzeichen und füge die Befehl(e)/-sargumente dem Output hinzu std::getline(iss, out, ' '); + /// Stoppe, sobald ein Kommentar im Source Code vorkommt if (out.at(0) != '#') { output.push_back(out); + } else { + break; } } while (!out.empty()); return output;