Escaped invalid characters before printing lexical error message.

This commit is contained in:
Christian Rinderknecht 2019-03-04 09:42:58 +01:00
parent 61575e13ea
commit c0f541a803
2 changed files with 1 additions and 2 deletions

View File

@ -333,7 +333,7 @@ module Make (Token: TOKEN) : (S with module Token = Token) =
Invalid_utf8_sequence -> Invalid_utf8_sequence ->
"Invalid UTF-8 sequence.\n" "Invalid UTF-8 sequence.\n"
| Unexpected_character c -> | Unexpected_character c ->
sprintf "Unexpected character '%c'.\n" c sprintf "Unexpected character '%s'.\n" (Char.escaped c)
| Undefined_escape_sequence -> | Undefined_escape_sequence ->
"Undefined escape sequence.\n\ "Undefined escape sequence.\n\
Hint: Remove or replace the sequence.\n" Hint: Remove or replace the sequence.\n"

View File

@ -1 +0,0 @@
let version = "629bb48b8f2d08187324e4ab0e649f4f784bb21b"