]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Parsing function calls
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index d087c4eaab733423098f6e2b742cf116c4e08297..195574ea1538c737b65aeb0f7bb4207a5d3066c8 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2012 
- *     Dale Weiler
+ * Copyright (C) 2012
+ *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  * SOFTWARE.
  */
 #include "gmqcc.h"
+
+bool parser_compile(const char *filename);
 int main(int argc, char **argv) {
-       argc--;
-       argv++;
-       
-       //const char *ifile = argv[0];
-       FILE *fp;
-       
-       /*TODO: proper interface swith switches*/
-       
-       asm_init ("test.qs", &fp);
-       asm_parse(fp);
-       asm_close(fp);
-       return 0;
+    util_debug("COM", "starting ...\n");
+
+    if (argc == 2) {
+        if (!parser_compile(argv[1])) {
+            printf("There were compile errors\n");
+        }
+    }
+
+    util_debug("COM", "cleaning ...\n");
+
+    util_meminfo();
+    return 0;
 }