@@ -6,6 +6,7 @@ civicc
*.cmx
*.swp
*.o
+types.ml
lexer.ml
parser.ml
parser.mli
@@ -0,0 +1,13 @@
+open Types
+
+(* Commandline args are stored in a global record
+ * (yes, it is a bit dirty, but I don't know how to do this without passing
+ * [args] to every function). *)
+let args = {
+ infile = None;
+ outfile = None;
+ verbose = 1;
+ cpp = true;
+ optimize = true;
+ endphase = "";
+}
@@ -0,0 +1,4 @@
+(** Global variables with runtime values, used in multiple modules. *)
+(** Values of command-line arguments, to be set by the [Main] module. *)
+val args : Types.args_record
@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate
@@ -0,0 +1,3 @@
+val analyse_context : Types.node -> Types.node
+val print_assembly : out_channel -> Types.instr list -> unit