X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/5c79bb689ab446551bc7ec4497e6c9b75582837e..a644da892dbd55a7be1aed029dafebe28d26d27e:/parse/ast.sml?ds=inline diff --git a/parse/ast.sml b/parse/ast.sml index 75f7042..9645f6a 100644 --- a/parse/ast.sml +++ b/parse/ast.sml @@ -38,7 +38,9 @@ sig datatype exp = Var of ident + | Cast of Type.vtype * exp | ConstExp of Word32.word + | StringExp of string | OpExp of oper * exp list | Marked of (* Kane *) exp Mark.marked | FuncCall of ident * (exp list) @@ -108,7 +110,9 @@ struct datatype exp = Var of ident + | Cast of Type.vtype * exp | ConstExp of Word32.word + | StringExp of string | OpExp of oper * exp list | Marked of exp Mark.marked | FuncCall of ident * (exp list) @@ -170,7 +174,9 @@ struct | pp_oper GE = ">=" fun pp_exp (Var(id)) = pp_ident id + | pp_exp (Cast(ty, exp)) = "["^(Type.Print.pp_type ty)^"]"^(pp_exp exp) | pp_exp (ConstExp(c)) = Word32Signed.toString c + | pp_exp (StringExp(s)) = "\"" ^ s ^ "\"" | pp_exp (OpExp(oper, [e])) = pp_oper oper ^ "(" ^ pp_exp e ^ ")" | pp_exp (OpExp(oper, [e1,e2])) =