let getElementType (e: element) = match e with
Reg(r,t) -> (
match t with
DInt -> ".i"
| DFloat -> ".f"
| _ -> raise (TYPE_ERROR "Unable to retrieve data type")
)
| Off(o,tp,_) -> (
match tp with
DInt -> ".i"
| DFloat -> ".f"
| _ -> raise (TYPE_ERROR "Unable to retrieve data type")
)
| Val(v) -> (
match v with
I(n) -> ".i"
| F(r) -> ".f"
)
| _ -> raise (TYPE_ERROR "Unable to retrieve data type")