]> Joshua Wise's Git repositories - snipe.git/blobdiff - parse/ast.sml
Propagate strings through the blarg backend.
[snipe.git] / parse / ast.sml
index 75f704243da867828b4a8ab0e70baec7336d3356..ce756abb87e7714fb5988df088b4be3698653f30 100644 (file)
@@ -39,6 +39,7 @@ sig
   datatype exp =
      Var of ident
    | ConstExp of Word32.word
+   | StringExp of string
    | OpExp of oper * exp list
    | Marked of (* Kane *) exp Mark.marked
    | FuncCall of ident * (exp list)
@@ -109,6 +110,7 @@ struct
   datatype exp =
      Var of ident
    | ConstExp of Word32.word
+   | StringExp of string
    | OpExp of oper * exp list
    | Marked of exp Mark.marked
    | FuncCall of ident * (exp list)
@@ -171,6 +173,7 @@ struct
 
     fun pp_exp (Var(id)) = pp_ident id
       | 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])) =
This page took 0.026721 seconds and 4 git commands to generate.