Noah 4 лет назад
Родитель
Сommit
2dd3afa1f1
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/tibasic.cpp

+ 8 - 0
src/tibasic.cpp

@@ -56,8 +56,16 @@ bool Compiler::compile(string inFile, string outFile)
     {
         getline(f, tmpLine, '\n');
 
+        // ignore comments
+        tmpLine = tmpLine.substr(0, tmpLine.find("#", 0));
+
+        // ignore empty lines
         if(!tmpLine.length())
+        {
+            //log(Debug, "Line with only whitespaces / comments detected!");
             continue;
+        }
+
 
         // Parse.
         token_t token;