This repository has been archived on 2022-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
compilateurMIPS/compiler.ml
2022-12-06 20:39:15 +01:00

12 lines
203 B
OCaml

open Ast.IR
open Mips
module Env = Map.Make(String)
let rec compile_expr e =
match e with
| Int n -> [ Li (V0, n) ]
let compile ir =
{ text = Baselib.builtins @ compile_expr ir
; data = [] }