diff options
| author | letouzey | 2010-06-01 14:28:53 +0000 |
|---|---|---|
| committer | letouzey | 2010-06-01 14:28:53 +0000 |
| commit | fb78828587a7ff9e39b3f1eaa1cf0786c7adf81e (patch) | |
| tree | b13e5d171a5fc51094e846a4d0028625380342be | |
| parent | aadff10ea8da78a9acc76a3dc595e47cfa5b72cf (diff) | |
restore handling of lexer errors
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13044 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | lib/compat.ml4 | 1 | ||||
| -rw-r--r-- | toplevel/cerrors.ml | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/compat.ml4 b/lib/compat.ml4 index aba2720456..312860a63e 100644 --- a/lib/compat.ml4 +++ b/lib/compat.ml4 @@ -80,6 +80,7 @@ module type LexerSig = sig module Error : sig type t exception E of t + val to_string : t -> string end end diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml index 1f5bbc5210..24e770d10b 100644 --- a/toplevel/cerrors.ml +++ b/toplevel/cerrors.ml @@ -35,6 +35,7 @@ let rec explain_exn_default_aux anomaly_string report_fn = function hov 0 (str "Syntax error: " ++ str txt ++ str ".") | Token.Error txt -> hov 0 (str "Syntax error: " ++ str txt ++ str ".") + | Lexer.Error.E err -> hov 0 (str (Lexer.Error.to_string err)) | Sys_error msg -> hov 0 (anomaly_string () ++ str "uncaught exception Sys_error " ++ str (guill msg) ++ report_fn ()) | UserError(s,pps) -> |
