Permalink
Browse files

Turn off debugging, but expose Cass_parser.set_debug to turn it on if…

… needed.
  • Loading branch information...
1 parent 7d9b135 commit f89fe2162395d11fc444c2ebfcb2b9b65f71a47c @samoht committed Nov 26, 2010
Showing with 7 additions and 2 deletions.
  1. +5 −2 pa_lib/cass_parser.ml
  2. +2 −0 pa_lib/cass_parser.mli
View
@@ -16,10 +16,13 @@
open Cass_ast
-let debug = true
+let debug = ref false
+
+let set_debug x =
+ debug := x
let ef (fmt: ('a , unit, string, unit) format4) =
- if debug then
+ if !debug then
Printf.kprintf (fun s -> Printf.eprintf "%s" s) fmt
else
Printf.kprintf (fun s -> ()) fmt
View
@@ -29,3 +29,5 @@ type token =
val main: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Cass_ast.t
+
+val set_debug : bool -> unit

0 comments on commit f89fe21

Please sign in to comment.