diff options
author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-11-27 13:37:47 +0000 |
---|---|---|
committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-11-27 13:37:47 +0000 |
commit | e3ade8ec81d0a87c21819832589251da7d7a5aa9 (patch) | |
tree | f1ee2e4cd8dc8d199c37fc9c10f5f3f2e70c6b64 | |
parent | 51285046e88440e597e2b9138df7aab99f1c8d4c (diff) |
[camlp4] Parse also <<val mutable virtual id : ty>> (PR#4417).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml | 2 | ||||
-rw-r--r-- | camlp4/test/fixtures/original_syntax.ml | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml index 229d111d0..10b8d9938 100644 --- a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml +++ b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml @@ -1256,6 +1256,8 @@ Very old (no more supported) syntax: <:class_str_item< inherit $ce$ as $pb$ >> | value_val; mf = opt_mutable; lab = label; e = cvalue_binding -> <:class_str_item< value $mutable:mf$ $lab$ = $e$ >> + | value_val; mf = opt_mutable; "virtual"; l = label; ":"; t = poly_type -> + <:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >> | value_val; "virtual"; mf = opt_mutable; l = label; ":"; t = poly_type -> <:class_str_item< value virtual $mutable:mf$ $l$ : $t$ >> | "method"; "virtual"; pf = opt_private; l = label; ":"; t = poly_type -> diff --git a/camlp4/test/fixtures/original_syntax.ml b/camlp4/test/fixtures/original_syntax.ml index bb498b417..72d733ea9 100644 --- a/camlp4/test/fixtures/original_syntax.ml +++ b/camlp4/test/fixtures/original_syntax.ml @@ -1 +1,3 @@ fun x when x <> 0 -> x / 42 +;; +object val virtual mutable x : int val mutable virtual y : int end |