*)
let debug = false
-let debug_print s = if debug then prerr_endline s
+let debug_print s = if debug then prerr_endline (Lazy.force s)
let loc =
let dummy_pos =
(dummy_pos, dummy_pos)
let expand_unicode_macro macro =
- debug_print (Printf.sprintf "Expanding macro '%s' ..." macro);
+ debug_print (lazy (Printf.sprintf "Expanding macro '%s' ..." macro));
let expansion = Utf8Macro.expand macro in
<:expr< $str:expansion$ >>
(String.sub q 0 pos,
String.sub q (pos + 1) (String.length q - pos - 1))
in
- debug_print (Printf.sprintf "QUOTATION = %s; ARG = %s" quotation arg);
+ debug_print (lazy (Printf.sprintf "QUOTATION = %s; ARG = %s" quotation arg));
if quotation = "unicode" then
let text = TXtok (loc, x, expand_unicode_macro arg) in
{used = []; text = text; styp = STlid (loc, "string")}