simplify the simplifier

This commit is contained in:
Mylloon 2022-12-11 02:36:55 +01:00
parent add2ae999c
commit ee6a10e7a5
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,5 +1,4 @@
open Errors open Errors
open Simplifier
let () = let () =
if Array.length Sys.argv != 2 if Array.length Sys.argv != 2
@ -14,7 +13,7 @@ let () =
(* Test.debug_parser Stdlib.stderr parsed; *) (* Test.debug_parser Stdlib.stderr parsed; *)
let ast = Semantics.analyze parsed in let ast = Semantics.analyze parsed in
(* Test.debug_semantics Stdlib.stderr ast; *) (* Test.debug_semantics Stdlib.stderr ast; *)
let asm = Compiler.compile (simplify ast) in let asm = Compiler.compile (Simplifier.simplify ast) in
Mips.emit Stdlib.stdout asm Mips.emit Stdlib.stdout asm
with with
| LexerError c -> | LexerError c ->