Ver código fonte

Forgot to add the mli files in the last commit... and now removed (generated) types.ml from repo index

Taddeus Kroes 12 anos atrás
pai
commit
bbb89db752

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ civicc
 *.cmx
 *.swp
 *.o
+types.ml
 lexer.ml
 parser.ml
 parser.mli

+ 13 - 0
globals.ml

@@ -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 = "";
+}

+ 4 - 0
globals.mli

@@ -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

+ 1 - 0
phases/assemble.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/boolop.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/constprop.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 3 - 0
phases/context.mli

@@ -0,0 +1,3 @@
+val phase : Types.intermediate -> Types.intermediate
+
+val analyse_context : Types.node -> Types.node

+ 1 - 0
phases/desug.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/dimreduce.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/extern.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/index.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/load.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/output.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/parse.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/peephole.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 3 - 0
phases/print.mli

@@ -0,0 +1,3 @@
+val print_assembly : out_channel -> Types.instr list -> unit
+
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/typecheck.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 0 - 0
types.ml → types.mli