added comment handling in CommandParser

This commit is contained in:
black
2025-07-06 11:01:35 +02:00
parent 551da48a29
commit ff50d328fb

View File

@@ -19,8 +19,11 @@ std::vector<std::string> CommandParser::parseLine(const std::string &input) {
do { do {
/// Trenne den IStringStream bei jedem Leerzeichen und füge die Befehl(e)/-sargumente dem Output hinzu /// Trenne den IStringStream bei jedem Leerzeichen und füge die Befehl(e)/-sargumente dem Output hinzu
std::getline(iss, out, ' '); std::getline(iss, out, ' ');
/// Stoppe, sobald ein Kommentar im Source Code vorkommt
if (out.at(0) != '#') { if (out.at(0) != '#') {
output.push_back(out); output.push_back(out);
} else {
break;
} }
} while (!out.empty()); } while (!out.empty());
return output; return output;