another try
[supertux.git] / tools / miniswig / main.cpp
index 0140a85..6461803 100644 (file)
@@ -1,11 +1,13 @@
+#include <config.h>
+
 #include <iostream>
 #include <fstream>
 #include <vector>
 #include <string>
-#include "tree.h"
-#include "globals.h"
-#include "create_wrapper.h"
-#include "create_docu.h"
+#include "tree.hpp"
+#include "globals.hpp"
+#include "create_wrapper.hpp"
+#include "create_docu.hpp"
 
 extern int yyparse();
 extern int yylex();
@@ -97,7 +99,8 @@ int main(int argc, char** argv)
         std_namespace->types.push_back(new StringType());
         unit->namespaces.push_back(std_namespace);
         unit->types.push_back(new HSQUIRRELVMType());
-        
+        unit->types.push_back(new SQIntegerType());
+       
         yyparse();
 
         Namespace* ns = unit;
@@ -127,14 +130,14 @@ int main(int argc, char** argv)
             std::ofstream dout(output_doc.c_str());
             if(!dout.good()) {
                 std::cerr << "Couldn't open file '" 
-                    << dout << "' for writing.\n";
+                    << output_doc << "' for writing.\n";
                 return 1;
             }
             DocuCreator creator(dout);
             creator.create_docu(ns);
         }
     } catch(std::exception& e) {
-        std::cerr << e.what() << "\n";
+        std::cerr << "Exception: " << e.what() << "\n";
         return 1;
     }