From f3e126bc3e8b12bb9e9d2cd62b9de0dd818c85ef Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Sat, 15 Nov 2014 18:21:14 +0100 Subject: Setting a keyword tag in Ppconstr. --- printing/ppconstr.ml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/printing/ppconstr.ml b/printing/ppconstr.ml index 1481ea191e..78ba401144 100644 --- a/printing/ppconstr.ml +++ b/printing/ppconstr.ml @@ -803,11 +803,17 @@ end) = struct end -(** Preserve the initial behaviour of Ppconstr by instantiating Make - with tagging functions that do nothing. *) +module Tag = +struct + let keyword = Ppstyle.make ["constr"; "keyword"] +end + +(** Instantiating Make with tagging functions that only add style + information. *) include Make (struct let do_not_tag _ x = x - let tag_keyword = do_not_tag () + let tag t s = Pp.tag (Pp.Tag.inj t Ppstyle.tag) s + let tag_keyword = tag Tag.keyword let tag_unparsing = do_not_tag let tag_constr_expr = do_not_tag end) -- cgit v1.2.3