From c0f541a8032f4e51d883dd6cb51966cc2fc7a488 Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht Date: Mon, 4 Mar 2019 09:42:58 +0100 Subject: [PATCH] Escaped invalid characters before printing lexical error message. --- Lexer.mll | 2 +- Version.ml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 Version.ml diff --git a/Lexer.mll b/Lexer.mll index fa4654148..cacbba693 100644 --- a/Lexer.mll +++ b/Lexer.mll @@ -333,7 +333,7 @@ module Make (Token: TOKEN) : (S with module Token = Token) = Invalid_utf8_sequence -> "Invalid UTF-8 sequence.\n" | Unexpected_character c -> - sprintf "Unexpected character '%c'.\n" c + sprintf "Unexpected character '%s'.\n" (Char.escaped c) | Undefined_escape_sequence -> "Undefined escape sequence.\n\ Hint: Remove or replace the sequence.\n" diff --git a/Version.ml b/Version.ml deleted file mode 100644 index 1a9a1e643..000000000 --- a/Version.ml +++ /dev/null @@ -1 +0,0 @@ -let version = "629bb48b8f2d08187324e4ab0e649f4f784bb21b"