finished ast implementation
[swftools.git] / lib / as3 / main.c
index d97f7da..0078e07 100644 (file)
@@ -27,6 +27,7 @@
 #include "../rfxswf.h"
 #include "../os.h"
 #include "files.h"
+#include "common.h"
 #include "tokenizer.h"
 #include "parser.tab.h"
 #include "parser.h"
@@ -78,6 +79,12 @@ int main(int argn, char*argv[])
         if(!strcmp(argv[t], "-q")) {
             as3_verbosity--;
         }
+        if(!strcmp(argv[t], "-D")) {
+            char*c = argv[t+1];
+            if(!strstr(c, "::"))
+                printf("Error: compile definition must contain \"::\"\n");
+            as3_set_define(c);
+        }
         if(!strcmp(argv[t], "-R")) {
             as3_set_option("recurse","1");
         }