Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/compiler/ast/ast-pp.sml
ViewVC logotype

Diff of /trunk/src/compiler/ast/ast-pp.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 380, Tue Oct 5 20:38:05 2010 UTC revision 381, Tue Oct 5 21:42:17 2010 UTC
# Line 46  Line 46 
46            fun sp () = PP.space ppStrm 1            fun sp () = PP.space ppStrm 1
47            val string = PP.string ppStrm            val string = PP.string ppStrm
48            fun var x = string(Var.nameOf x)            fun var x = string(Var.nameOf x)
49              fun ppIndex (ppStrm, NONE) = PP.string ppStrm ":"
50                | ppIndex (ppStrm, SOME e) = ppExp (ppStrm, e)
51            fun pp e = (case e            fun pp e = (case e
52                   of AST.E_Var x => var x                   of AST.E_Var x => var x
53                    | AST.E_Lit lit => string (Literal.toString lit)                    | AST.E_Lit lit => string (Literal.toString lit)
# Line 55  Line 57 
57                        var f; ppTyArgs (ppStrm, mvs); sp(); ppArgs (ppStrm, args))                        var f; ppTyArgs (ppStrm, mvs); sp(); ppArgs (ppStrm, args))
58                    | AST.E_Cons es => (                    | AST.E_Cons es => (
59                        ppList ppExp ("[", ",", "]") (ppStrm, es))                        ppList ppExp ("[", ",", "]") (ppStrm, es))
60                      | AST.E_Slice(e, indices) => (
61                          pp e;
62                          ppList ppIndex ("[", ",", "]") (ppStrm, indices))
63                    | AST.E_Cond(e1, e2, e3) => (                    | AST.E_Cond(e1, e2, e3) => (
64                        pp e1; sp(); string "?"; sp(); pp e2; sp(); string ":"; sp(); pp e3)                        pp e1; sp(); string "?"; sp(); pp e2; sp(); string ":"; sp(); pp e3)
65                  (* end case *))                  (* end case *))

Legend:
Removed from v.380  
changed lines
  Added in v.381

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0