diff options
author | Alain Frisch <alain@frisch.fr> | 2013-08-29 11:42:23 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-08-29 11:42:23 +0000 |
commit | 76d35efd0aff69c82daa7d6ca2335f25cbaf5ceb (patch) | |
tree | 9c67baeddd0846e5ab23b0289674cb212c765042 /parsing/syntaxerr.ml | |
parent | a18853fde97e44a7ff21184c77998f94edfa14f7 (diff) | |
parent | 6f15a5da7b420f91b68e03ee18c94e0d3bfa8857 (diff) |
Reintegrate the extension_point branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/syntaxerr.ml')
-rw-r--r-- | parsing/syntaxerr.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/parsing/syntaxerr.ml b/parsing/syntaxerr.ml index 5c17a99a3..b19a382d4 100644 --- a/parsing/syntaxerr.ml +++ b/parsing/syntaxerr.ml @@ -17,6 +17,7 @@ open Format type error = Unclosed of Location.t * string * Location.t * string | Expecting of Location.t * string + | Not_expecting of Location.t * string | Applicative_path of Location.t | Variable_in_scope of Location.t * string | Other of Location.t @@ -42,6 +43,10 @@ let report_error ppf = function fprintf ppf "%a@[Syntax error: %s expected.@]" Location.print_error loc nonterm + | Not_expecting (loc, nonterm) -> + fprintf ppf + "%a@[Syntax error: %s not expected.@]" + Location.print_error loc nonterm | Applicative_path loc -> fprintf ppf "%aSyntax error: applicative paths of the form F(X).t \ @@ -61,4 +66,5 @@ let location_of_error = function | Applicative_path l | Variable_in_scope(l,_) | Other l + | Not_expecting (l, _) | Expecting (l, _) -> l |