Simple list implementation

This commit is contained in:
2025-10-02 14:44:48 +10:00
parent d7123aff1e
commit cf85205ff0
12 changed files with 155 additions and 26 deletions

View File

@@ -3,16 +3,6 @@
#include <string>
#include <vector>
// Helper to trim whitespace
std::string trim(const std::string& str) {
size_t first = str.find_first_not_of(" \t\n\r");
if (std::string::npos == first) {
return str;
}
size_t last = str.find_last_not_of(" \t\n\r");
return str.substr(first, (last - first + 1));
}
std::vector<Instruction> parse(std::string program) {
std::vector<Instruction> instructions;
std::vector<std::string> lines;