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/gldb/db.sml
ViewVC logotype

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

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

revision 1377, Fri Apr 4 20:45:22 2014 UTC revision 1382, Sat Apr 5 04:15:32 2014 UTC
# Line 203  Line 203 
203      fun extendCommands (base, ext) = let      fun extendCommands (base, ext) = let
204            val findInBase = ATbl.find base            val findInBase = ATbl.find base
205            val insertInBase = ATbl.insert base            val insertInBase = ATbl.insert base
206            fun extend (cmd as X.Cmd{name, protos}) = (            fun extend (cmd as X.Cmd{name, remove, protos}) = (
207                  case findInBase name                  case findInBase name
208                   of SOME(X.Cmd{protos=protos', ...}) => let                   of SOME(X.Cmd{protos=protos', ...}) => let
209                      (* we need to and any new prototypes into the existing list.  Note that for  (* FIXME: extend remove *)
210                        (* we need to add any new prototypes into the existing list.  Note that for
211                       * the expected usage of the extend function, the "ext" table will not add                       * the expected usage of the extend function, the "ext" table will not add
212                       * prototypes, just commands.                       * prototypes, just commands.
213                       *)                       *)
# Line 222  Line 223 
223                        in                        in
224                          if List.null newProtos                          if List.null newProtos
225                            then ()                            then ()
226                            else insertInBase(name, X.Cmd{name=name, protos=protos' @ newProtos})                            else insertInBase(name, X.Cmd{name=name, remove=remove, protos=protos' @ newProtos})
227                        end                        end
228                    | NONE => insertInBase(name, cmd)                    | NONE => insertInBase(name, cmd)
229                  (* end case *))                  (* end case *))

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

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