Skip to content

Commit bb738be

Browse files
authored
Update vendored parser with ocaml/10441 (#1755)
1 parent ca375bb commit bb738be

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

vendor/ocaml-4.13/parser.mly

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ The precedences must be listed from low to high.
824824
%nonassoc below_DOT
825825
%nonassoc DOT DOTOP
826826
/* Finally, the first tokens of simple_expr are above everything else. */
827-
%nonassoc BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT
827+
%nonassoc BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT OBJECT
828828
LBRACE LBRACELESS LBRACKET LBRACKETBAR LIDENT LPAREN
829829
NEW PREFIXOP STRING TRUE UIDENT UNDERSCORE
830830
LBRACKETPERCENT QUOTED_STRING_EXPR
@@ -2319,10 +2319,6 @@ expr:
23192319
{ Pexp_assert $3, $2 }
23202320
| LAZY ext_attributes simple_expr %prec below_HASH
23212321
{ Pexp_lazy $3, $2 }
2322-
| OBJECT ext_attributes class_structure END
2323-
{ Pexp_object $3, $2 }
2324-
| OBJECT ext_attributes class_structure error
2325-
{ unclosed "object" $loc($1) "end" $loc($4) }
23262322
;
23272323
%inline expr_:
23282324
| simple_expr nonempty_llist(labeled_simple_expr)
@@ -2375,6 +2371,10 @@ simple_expr:
23752371
{ Pexp_constraint (ghexp ~loc:$sloc (Pexp_pack $4), $6), $3 }
23762372
| LPAREN MODULE ext_attributes module_expr COLON error
23772373
{ unclosed "(" $loc($1) ")" $loc($6) }
2374+
| OBJECT ext_attributes class_structure END
2375+
{ Pexp_object $3, $2 }
2376+
| OBJECT ext_attributes class_structure error
2377+
{ unclosed "object" $loc($1) "end" $loc($4) }
23782378
;
23792379
%inline simple_expr_:
23802380
| mkrhs(val_longident)

vendor/parse-wyc/lib/parser.mly

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ The precedences must be listed from low to high.
821821
%nonassoc below_DOT
822822
%nonassoc DOT DOTOP
823823
/* Finally, the first tokens of simple_expr are above everything else. */
824-
%nonassoc BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT
824+
%nonassoc BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT OBJECT
825825
LBRACE LBRACELESS LBRACKET LBRACKETBAR LIDENT LPAREN
826826
NEW PREFIXOP STRING TRUE UIDENT
827827
LBRACKETPERCENT QUOTED_STRING_EXPR
@@ -2311,10 +2311,6 @@ expr [@recover.expr Annot.Exp.mk ()]:
23112311
{ Pexp_assert $3, $2 }
23122312
| LAZY ext_attributes simple_expr %prec below_HASH
23132313
{ Pexp_lazy $3, $2 }
2314-
| OBJECT ext_attributes class_structure END
2315-
{ Pexp_object $3, $2 }
2316-
(*| OBJECT ext_attributes class_structure error
2317-
{ unclosed "object" $loc($1) "end" $loc($4) }*)
23182314
;
23192315
%inline expr_:
23202316
| simple_expr nonempty_llist(labeled_simple_expr)
@@ -2367,6 +2363,10 @@ simple_expr:
23672363
{ Pexp_constraint (ghexp ~loc:$sloc (Pexp_pack $4), $6), $3 }
23682364
(*| LPAREN MODULE ext_attributes module_expr COLON error
23692365
{ unclosed "(" $loc($1) ")" $loc($6) }*)
2366+
| OBJECT ext_attributes class_structure END
2367+
{ Pexp_object $3, $2 }
2368+
(*| OBJECT ext_attributes class_structure error
2369+
{ unclosed "object" $loc($1) "end" $loc($4) }*)
23702370
;
23712371
%inline simple_expr_:
23722372
| mkrhs(val_longident)

0 commit comments

Comments
 (0)