summaryrefslogtreecommitdiffstats
path: root/parsing/parser.mly
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-05-16 13:34:53 +0000
committerAlain Frisch <alain@frisch.fr>2013-05-16 13:34:53 +0000
commita3b1c67fffd7de640ee9a0791f1fd0fad965b867 (patch)
treec858e0cb4ebdd42a648b25e620a19a53fc1fa6e6 /parsing/parser.mly
parente4098f9f42000fbf2381a96115142a4aa3ba4a34 (diff)
#5980: explicit way to silence the new warning (open! X).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13685 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/parser.mly')
-rw-r--r--parsing/parser.mly14
1 files changed, 7 insertions, 7 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly
index 35145b597..429d6bec0 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -594,8 +594,8 @@ structure_item:
{ mkstr(Pstr_recmodule(List.rev $3)) }
| MODULE TYPE ident EQUAL module_type
{ mkstr(Pstr_modtype(mkrhs $3 3, $5)) }
- | OPEN mod_longident
- { mkstr(Pstr_open (mkrhs $2 2)) }
+ | OPEN override_flag mod_longident
+ { mkstr(Pstr_open ($2, mkrhs $3 3)) }
| CLASS class_declarations
{ mkstr(Pstr_class (List.rev $2)) }
| CLASS TYPE class_type_declarations
@@ -664,8 +664,8 @@ signature_item:
{ mksig(Psig_modtype(mkrhs $3 3, Pmodtype_abstract)) }
| MODULE TYPE ident EQUAL module_type
{ mksig(Psig_modtype(mkrhs $3 3, Pmodtype_manifest $5)) }
- | OPEN mod_longident
- { mksig(Psig_open (mkrhs $2 2)) }
+ | OPEN override_flag mod_longident
+ { mksig(Psig_open ($2, mkrhs $3 3)) }
| INCLUDE module_type
{ mksig(Psig_include $2) }
| CLASS class_descriptions
@@ -970,8 +970,8 @@ expr:
{ mkexp(Pexp_let($2, List.rev $3, $5)) }
| LET MODULE UIDENT module_binding IN seq_expr
{ mkexp(Pexp_letmodule(mkrhs $3 3, $4, $6)) }
- | LET OPEN mod_longident IN seq_expr
- { mkexp(Pexp_open(mkrhs $3 3, $5)) }
+ | LET OPEN override_flag mod_longident IN seq_expr
+ { mkexp(Pexp_open($3, mkrhs $4 4, $6)) }
| FUNCTION opt_bar match_cases
{ mkexp(Pexp_function("", None, List.rev $3)) }
| FUN labeled_simple_pattern fun_def
@@ -1088,7 +1088,7 @@ simple_expr:
| simple_expr DOT label_longident
{ mkexp(Pexp_field($1, mkrhs $3 3)) }
| mod_longident DOT LPAREN seq_expr RPAREN
- { mkexp(Pexp_open(mkrhs $1 1, $4)) }
+ { mkexp(Pexp_open(Fresh, mkrhs $1 1, $4)) }
| mod_longident DOT LPAREN seq_expr error
{ unclosed "(" 3 ")" 5 }
| simple_expr DOT LPAREN seq_expr RPAREN