type type_t = Int_t
module Syntax = struct
type ident = string
type value = Int of int
type expr =
| Val of
{ value : value
; pos : Lexing.position
}
| Var of
{ name : ident
type instr =
| Decl of
; type_t : type_t
| Assign of
{ var : ident
; expr : expr
and block = instr list
end
module IR = struct
| Val of value
| Var of ident
| Decl of ident
| Assign of ident * expr