Remove `opt_pattern_type_constraint`.

master
François Pottier 2018-10-22 18:17:15 +02:00 committed by François Pottier
parent 6d50aa60ce
commit 7f5f9c3207
1 changed files with 2 additions and 6 deletions

View File

@ -2642,17 +2642,13 @@ lbl_pattern_list:
{ let (fields, closed) = $3 in $1 :: fields, closed }
;
lbl_pattern:
mkrhs(label_longident) opt_pattern_type_constraint EQUAL pattern
mkrhs(label_longident) preceded(COLON, core_type)? EQUAL pattern
{ ($1, mkpat_opt_constraint ~loc:$sloc $4 $2) }
| mkrhs(label_longident) opt_pattern_type_constraint
| mkrhs(label_longident) preceded(COLON, core_type)?
{ let label = {$1 with txt = Longident.last $1.txt} in
($1, mkpat_opt_constraint ~loc:$sloc
(pat_of_label ~loc:$sloc label) $2) }
;
opt_pattern_type_constraint:
COLON core_type { Some $2 }
| /* empty */ { None }
;
/* Value descriptions */