Commit 89c36706 authored by fpottier's avatar fpottier

A lexer fix for OCaml variant types.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/menhir@354 0f8b5475-4b4e-0410-85a8-ee3154a6bfe7
parent 3538e832
......@@ -326,11 +326,12 @@ and comment openingpos = parse
{ comment openingpos lexbuf }
(* Collect an O'Caml type delimited by angle brackets. Angle brackets can
appear as part of O'Caml function types. They might also appear as part
of O'Caml variant types, but we ignore that possibility for the moment. *)
appear as part of O'Caml function types and variant types, so we must
recognize them and *not* treat them as a closing bracket. *)
and ocamltype openingpos = parse
| "->"
| "[>"
{ ocamltype openingpos lexbuf }
| '>'
{ OCAMLTYPE (Stretch.Declared (mk_stretch true openingpos (lexeme_start_p lexbuf) [])) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment