This commit is contained in:
Andrea Bontempi 2015-08-07 17:52:02 +02:00
parent fb99662ae8
commit ad34cec432

View file

@ -15,7 +15,10 @@ RamInstruction::RamInstruction(std::string filename) {
std::string line;
while (std::getline(source_file, line)) {
// Increment line number
this->lineNumber++;
// Remove all char after #
line = line.substr(0, line.find('#'));
@ -45,7 +48,6 @@ RamInstruction::RamInstruction(std::string filename) {
// Skip if empty line
if(line.empty()) {
this->lineNumber++;
continue;
}
@ -64,8 +66,6 @@ RamInstruction::RamInstruction(std::string filename) {
this->code.push_back(instruction);
this->lineNumber++;
}
source_file.close();