Nicolas Winkler 6 лет назад
Родитель
Сommit
0c8cef5142
2 измененных файлов с 7 добавлено и 0 удалено
  1. 4 0
      src/Driver.cpp
  2. 3 0
      src/parser.y

+ 4 - 0
src/Driver.cpp

@@ -50,9 +50,13 @@ Options Options::parseOptions(int argc, char** argv)
             }
         }
         else {
+            if (options.outfile == "")
+                options.outfile = arg + ".o";
             options.infiles.push_back(std::move(arg));
         }
     }
+    if (options.outfile == "")
+        options.outfile = "a.out";
     return options;
 }
 

+ 3 - 0
src/parser.y

@@ -191,6 +191,9 @@ topLevel:
         $2 = nullptr;
     }
     |
+    topLevel externMethodDefinition {
+    }
+    |
     topLevel error methodDefinition {
         reportError(qlow::SyntaxError(@2));
         yyerrok;