]> Joshua Wise's Git repositories - snipe.git/blobdiff - trans/trans.sml
Add cast syntax.
[snipe.git] / trans / trans.sml
index 73968d9c36cf0f20df3007576d5ded04e0835b4a..ec66fd5f4507cb8df767ae89babaacbb572d5e72 100644 (file)
@@ -97,7 +97,9 @@ struct
       fun trans_exp env vartypes (A.Var(id)) =
         (* after type-checking, id must be declared; do not guard lookup *)
             T.TEMP (Symbol.look' env id)
+        | trans_exp env vartypes (A.Cast (ty, e)) = trans_exp env vartypes e (* lurrr *)
         | trans_exp env vartypes (A.ConstExp c) = T.CONST(c)
+        | trans_exp env vartypes (A.StringExp s) = T.STRING(Stringref.new s)
         | trans_exp env vartypes (A.OpExp(oper, [e1, e2])) =
             T.BINOP(trans_oper oper, trans_exp env vartypes e1, trans_exp env vartypes e2)
         | trans_exp env vartypes (A.OpExp(oper, [e])) =
This page took 0.021168 seconds and 4 git commands to generate.