blueloveTH 2 лет назад
Родитель
Сommit
86a290e6c4
2 измененных файлов с 5 добавлено и 2 удалено
  1. 1 1
      amalgamate.py
  2. 4 1
      src/main.cpp

+ 1 - 1
amalgamate.py

@@ -8,7 +8,7 @@ with open("src/opcodes.h", "rt", encoding='utf-8') as f:
 pipeline = [
 	["common.h", "memory.h", "str.h", "tuplelist.h", "namedict.h", "error.h"],
 	["obj.h", "parser.h", "codeobject.h", "frame.h"],
-	["vm.h", "ref.h", "ceval.h", "compiler.h", "repl.h"],
+	["gc.h", "vm.h", "ref.h", "ceval.h", "compiler.h", "repl.h"],
 	["iter.h", "cffi.h", "io.h", "_generated.h", "pocketpy.h"]
 ]
 

+ 4 - 1
src/main.cpp

@@ -69,7 +69,10 @@ int main(int argc, char** argv){
             return 1;
         }        
         std::ifstream file(filepath);
-        if(!file.is_open()) return 1;
+        if(!file.is_open()){
+            std::cerr << "Failed to open file: " << argv_1 << std::endl;
+            return 1;
+        }
         std::string src((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
 
         // set parent path as cwd