Permalink
Browse files

Add support for exception generators in "with sexp"

  • Loading branch information...
1 parent 258f139 commit ffa59f4b55c3783ebc261fbe14ed0536e7897f76 @let-def let-def committed Mar 24, 2013
Showing with 6 additions and 2 deletions.
  1. +4 −0 chunk_parser.mly
  2. +2 −2 outline_parser.mly
View
@@ -615,6 +615,8 @@ structure_item:
}
| EXCEPTION UIDENT constructor_arguments
{ [mkstr $startpos $endpos (Pstr_exception(mkrhs $startpos($2) $endpos($2) $2, $3))] }
+ | EXCEPTION UIDENT constructor_arguments WITH with_extensions
+ { [mkstr $startpos $endpos (Pstr_exception(mkrhs $startpos($2) $endpos($2) $2, $3))] }
| EXCEPTION UIDENT EQUAL constr_longident
{ [mkstr $startpos $endpos (Pstr_exn_rebind(mkrhs $startpos($2) $endpos($2) $2,
mkloc $4 (rhs_loc $startpos($4) $endpos($4))))] }
@@ -695,6 +697,8 @@ signature_item:
}
| EXCEPTION UIDENT constructor_arguments
{ [mksig $startpos $endpos (Psig_exception(mkrhs $startpos($2) $endpos($2) $2, $3))] }
+ | EXCEPTION UIDENT constructor_arguments WITH with_extensions
+ { [mksig $startpos $endpos (Psig_exception(mkrhs $startpos($2) $endpos($2) $2, $3))] }
| MODULE UIDENT module_declaration
{ [mksig $startpos $endpos (Psig_module(mkrhs $startpos($2) $endpos($2) $2, $3))] }
| MODULE REC module_rec_declarations
View
@@ -295,7 +295,7 @@ structure_item:
{ emit_top Definition $endpos }
| TYPE type_declarations with_extension
{ emit_top Definition $endpos }
- | EXCEPTION UIDENT constructor_arguments
+ | EXCEPTION UIDENT constructor_arguments with_extension
{ emit_top Definition $endpos }
| EXCEPTION UIDENT EQUAL constr_longident
{ emit_top Definition $endpos }
@@ -364,7 +364,7 @@ signature_item:
{ () }
| TYPE type_declarations with_extension
{ () }
- | EXCEPTION UIDENT constructor_arguments
+ | EXCEPTION UIDENT constructor_arguments with_extension
{ () }
| MODULE UIDENT module_declaration
{ () }

0 comments on commit ffa59f4

Please sign in to comment.