diff options
author | Alain Frisch <alain@frisch.fr> | 2013-04-11 13:52:06 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-04-11 13:52:06 +0000 |
commit | 92ad47d47bf87f75e8842d57f1706c811e5cc9f4 (patch) | |
tree | 924c31811a1f6c7d019e326cc46cd5ea07fe9fff /parsing/syntaxerr.ml | |
parent | 8a9188eb3f38771219d03be2120b9df9f3f1d84f (diff) |
Keep item attributes on let-binding structure items.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13511 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 |