Taddeus Kroes 12 år sedan
förälder
incheckning
51ae206f02
3 ändrade filer med 5 tillägg och 3 borttagningar
  1. 1 0
      main.ml
  2. 1 1
      phases/print.ml
  3. 3 2
      util.ml

+ 1 - 0
main.ml

@@ -9,6 +9,7 @@ let compile infile verbose =
     in
     run_phases (Inputfile (infile, verbose)) [
         Parse.phase;
+        Print.phase;
         Desug.phase;
         Print.phase;
         (*Typecheck.phase;*)

+ 1 - 1
phases/print.ml

@@ -3,7 +3,7 @@ open Stringify
 
 let phase repr =
     (* TODO: check verbosity *)
-    print_endline "- Print AST";
+    (*print_endline "- Print AST";*)
     match repr with
     | Node (node, verbose) ->
         print_endline "-------------------------------------------------------";

+ 3 - 2
util.ml

@@ -73,6 +73,8 @@ let rec transform visitor node =
     | While (_, _, loc)
     | DoWhile (_, _, loc)
     | For (_, _, _, _, _, loc)
+    | Statements (_, loc)
+    | Allocate (_, _, loc)
     | BoolConst (_, loc)
     | IntConst (_, loc)
     | FloatConst (_, loc)
@@ -84,7 +86,6 @@ let rec transform visitor node =
     | Binop (_, _, _, loc)
     | Cond (_, _, _, loc)
     | TypeCast (_, _, loc)
-    | FunCall (_, _, loc)
-    | Statements (_, loc) -> loc
+    | FunCall (_, _, loc) -> loc
 
     | Expr value -> locof value