Commit 91413f34 authored by François Bobot's avatar François Bobot

Supports quotes in OCaml printer

parent f428b633
......@@ -92,12 +92,15 @@ module Print = struct
List.iter (fun s -> Hstr.add h s ()) ocaml_keywords;
Hstr.mem h
let char_to_alnumusquote c =
match c with '\'' -> "\'" | _ -> char_to_alnumus c
(* iprinter: local names
aprinter: type variables
tprinter: toplevel definitions *)
let iprinter, aprinter, tprinter =
let isanitize = sanitizer char_to_alnumus char_to_alnumus in
let lsanitize = sanitizer char_to_lalnumus char_to_alnumus in
let isanitize = sanitizer char_to_alnumus char_to_alnumusquote in
let lsanitize = sanitizer char_to_lalnumus char_to_alnumusquote in
create_ident_printer ocaml_keywords ~sanitizer:isanitize,
create_ident_printer ocaml_keywords ~sanitizer:lsanitize,
create_ident_printer ocaml_keywords ~sanitizer:lsanitize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment