[svn] r5821: nemerle/trunk: lib/getopt.n ncc/CompilationOptions.n

nazgul svnadmin at nemerle.org
Sat Oct 15 00:28:24 CEST 2005


Log:
Make boolean option default to true. Make -debug a boolean option

Author: nazgul
Date: Sat Oct 15 00:28:19 2005
New Revision: 5821

Modified:
   nemerle/trunk/lib/getopt.n
   nemerle/trunk/ncc/CompilationOptions.n

Modified: nemerle/trunk/lib/getopt.n
==============================================================================
--- nemerle/trunk/lib/getopt.n	(original)
+++ nemerle/trunk/lib/getopt.n	Sat Oct 15 00:28:19 2005
@@ -208,6 +208,7 @@
               | (CliOption.SubstitutionString (s), Some (a)) =>
                 parse_opts (s (a))
                 
+              | (CliOption.Boolean (h), None)
               | (CliOption.Boolean (h), Some ("+")) => h (true)
               | (CliOption.Boolean (h), Some ("-")) => h (false)
               | (CliOption.String (h), Some (a)) => h (a)

Modified: nemerle/trunk/ncc/CompilationOptions.n
==============================================================================
--- nemerle/trunk/ncc/CompilationOptions.n	(original)
+++ nemerle/trunk/ncc/CompilationOptions.n	Sat Oct 15 00:28:19 2005
@@ -323,10 +323,10 @@
                          Options.LinkedResources = x :: Options.LinkedResources;
                        }),
 
-        Getopt.CliOption.Flag (name = "-debug", 
+        Getopt.CliOption.Boolean (name = "-debug", 
                      aliases = ["-g"],
                      help = "Enable debug symbols generation",
-                     handler = fun () { Options.EmitDebug = true; }),
+                     handler = fun (x) { Options.EmitDebug = x }),
                        
         Getopt.CliOption.SubstitutionString (name = "-pkg-config",
                        aliases = ["-pkg", "-p"],



More information about the svn mailing list