(* translate.sml * * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu) * All rights reserved. * * Translate AST code into the IL representation. *) structure Translate : sig val translate : AST.program -> ?? end = struct structure VMap = Var.Map structure IL = HighIL (* expression translation *) fun cvtExpr (env, exp, kont) = let fun cvt e = (case e of AST.E_Var(x, tyArgs, ty) => | AST.E_Lit lit => | AST.E_Tuple es => | AST.E_Apply(f, tyArgs, args, ty) => | AST.E_Cons of expr list | AST.E_Cond(e1, e2, e3) => (* end case *)) in end and cvtStmt (env, stm) = (case stm of AST.S_Block of stmt list | AST.S_Decl of var_decl | AST.S_IfThenElse of expr * stmt * stmt | AST.S_Assign of var * expr | AST.S_New of Atom.atom * expr list | AST.S_Die | AST.S_Stabilize (* end case *)) end
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: AST.S_New of Atom.atom * expr list | AST.S_Die | AST.S_Stabilize (* end case *)) end