Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 87b36d0

Browse files
author
Iwan
committed
Add comment about codepoint literal encoding for printer.
1 parent 7097f33 commit 87b36d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/res_core.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,9 @@ let parseConstant p =
921921
if p.mode = ParseForTypeChecker then
922922
Pconst_char c
923923
else
924+
(* Pconst_char char does not have enough information for formatting.
925+
* When parsing for the printer, we encode the char contents as a string
926+
* with a special prefix. *)
924927
Pconst_string (original, Some "INTERNAL_RES_CHAR_CONTENTS")
925928
| token ->
926929
Parser.err p (Diagnostics.unexpected token p.breadcrumbs);

0 commit comments

Comments
 (0)