Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Diff of /trunk/sml3d/gen/gen-from-xml/spec-db/db-xml-print.sml
ViewVC logotype

Diff of /trunk/sml3d/gen/gen-from-xml/spec-db/db-xml-print.sml

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

revision 1376, Wed Apr 2 17:51:39 2014 UTC revision 1377, Fri Apr 4 20:45:22 2014 UTC
# Line 51  Line 51 
51              prItem              prItem
52            end            end
53    
54      fun prOptAttr (outS, attr, SOME v) = prf(outS, " %s=\"%s\"", [F.STR v])      fun prAttr (outS, attr, v) = prf(outS, " %s=\"%s\"", [F.STR v])
55    
56        fun prOptAttr (outS, attr, SOME v) = prAttr (outS, attr, v)
57        | prOptAttr (_, _, NONE) = ()        | prOptAttr (_, _, NONE) = ()
58    
59      val prTypes = let      val prTypes = let
# Line 84  Line 86 
86                          [F.STR(CType.toString(#cty retTy))]);                          [F.STR(CType.toString(#cty retTy))]);
87                        prOptAttr (outS, "mlty", #mlty retTy);                        prOptAttr (outS, "mlty", #mlty retTy);
88                        pr (outS, "/>\n"))                        pr (outS, "/>\n"))
89                  fun prParam outS (X.Param{name, cty, mlty}) = (                  fun prParam outS (X.Param{name, group, cty, mlty}) = (
90                        indent outS;                        indent outS;
91                        prf (outS, "<param name=\"%s\" ctype=\"%s\" ",                        prf (outS, "<param name=\"%s\"", [F.ATOM name]);
92                          [F.ATOM name, F.STR(CType.toString cty)]);                        prOptAttr (outS, "group", Option.map Atom.toString group);
93                          prAttr (outS, "ctype", CType.toString cty);
94                        prOptAttr (outS, "mlty", mlty);                        prOptAttr (outS, "mlty", mlty);
95                        pr (outS, "/>\n"))                        pr (outS, "/>\n"))
96                  in                  in
# Line 131  Line 134 
134                  val outS' = incIndent outS                  val outS' = incIndent outS
135                  in                  in
136                    indent outS;                    indent outS;
137                    prf(outS, "<feature name=\"%s\" version=\"%s\">\n", [F.ATOM name, F.STR version]);                    prf(outS, "<feature name=\"%s\" version=\"%s\">\n", [
138                          F.ATOM name, F.STR(String.concatWith "." (List.map Int.toString version))
139                        ]);
140                    prTys (outS', [], types);                    prTys (outS', [], types);
141                    prEnums (outS', [], enums);                    prEnums (outS', [], enums);
142                    prCmds (outS', [], commands);                    prCmds (outS', [], commands);

Legend:
Removed from v.1376  
changed lines
  Added in v.1377

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