10 lines
200 B
OCaml
10 lines
200 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 = [] }
|