diff options
Diffstat (limited to 'parsing/parser.mly')
-rw-r--r-- | parsing/parser.mly | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index d93ec72a5..94c17342c 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -650,7 +650,7 @@ class_list: ; class_def: virtual_flag closed_flag - type_parameters LIDENT simple_pattern_list self self_type EQUAL + class_type_parameters LIDENT simple_pattern_list self self_type EQUAL constraints class_fields { { pcl_name = $4; pcl_param = $3; pcl_args = List.rev $5; pcl_self = $6; pcl_self_ty = $7; pcl_cstr = List.rev $9; @@ -658,6 +658,10 @@ class_def: pcl_kind = $1; pcl_closed = $2; pcl_loc = symbol_loc () } } ; +class_type_parameters: + type_parameters + { $1, symbol_loc () } +; simple_pattern_list: simple_pattern { [$1] } @@ -711,7 +715,8 @@ class_type_list: { [$1] } ; class_type: - virtual_flag closed_flag type_parameters LIDENT type_list self_type + virtual_flag closed_flag class_type_parameters LIDENT type_list + self_type EQUAL constraints class_type_fields { { pcty_name = $4; pcty_param = $3; pcty_args = $5; |