let debug = false
let debug_print s = if debug then prerr_endline (Lazy.force s)
-let loc =
- let dummy_pos =
- { Lexing.pos_fname = ""; Lexing.pos_lnum = -1; Lexing.pos_bol = -1;
- Lexing.pos_cnum = -1 }
- in
- (dummy_pos, dummy_pos)
+let loc = Stdpp.make_loc (-1, -1)
let expand_unicode_macro macro =
debug_print (lazy (Printf.sprintf "Expanding macro '%s' ..." macro));
String.sub q (pos + 1) (String.length q - pos - 1))
in
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")}
+ if quotation = "unicode" then
+ AStok (loc, x, Some (ATexpr (loc, expand_unicode_macro arg)))
else
assert false
]