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;