|
|
@@ -20,6 +20,11 @@ open Ast
|
|
|
open Util
|
|
|
|
|
|
let rec bool_op = function
|
|
|
+ | Binop (Eq, (Type (_, Bool) as left), (Type (_, Bool) as right), loc) ->
|
|
|
+ let left = Type (TypeCast (Int, left, noloc), Int) in
|
|
|
+ let right = Type (TypeCast (Int, right, noloc), Int) in
|
|
|
+ Binop (Eq, left, right, loc)
|
|
|
+
|
|
|
| node -> transform_children bool_op node
|
|
|
|
|
|
let rec phase input =
|