This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree 3 files changed +5
-51
lines changed
errors/expressions/expected
recovery/expression/expected
3 files changed +5
-51
lines changed Original file line number Diff line number Diff line change @@ -2691,13 +2691,9 @@ and parseBracedOrRecordExpr p =
2691
2691
Parser. expect Lbrace p;
2692
2692
match p.Parser. token with
2693
2693
| Rbrace ->
2694
- Parser. err p (Diagnostics. unexpected Rbrace p.breadcrumbs);
2695
2694
Parser. next p;
2696
2695
let loc = mkLoc startPos p.prevEndPos in
2697
- let braces = makeBracesAttr loc in
2698
- Ast_helper.Exp. construct ~attrs: [braces] ~loc
2699
- (Location. mkloc (Longident. Lident " ()" ) loc)
2700
- None
2696
+ Ast_helper.Exp. record ~loc [] None
2701
2697
| DotDotDot ->
2702
2698
(* beginning of record spread, parse record *)
2703
2699
Parser. next p;
Original file line number Diff line number Diff line change 1
-
2
- Syntax error!
3
- tests/parsing/errors/expressions/emptyBlock.res:1:10
4
-
5
- 1 │ let x = {}
6
- 2 │
7
- 3 │ let f = (a, b) => {}
8
-
9
- This let-binding misses an expression
10
-
11
-
12
- Syntax error!
13
- tests/parsing/errors/expressions/emptyBlock.res:3:20
14
-
15
- 1 │ let x = {}
16
- 2 │
17
- 3 │ let f = (a, b) => {}
18
- 4 │
19
-
20
- Missing expression
21
-
22
- let x = ((())[@ns.braces ])
23
- let f a b = ((())[@ns.braces ])
1
+ let x = { }
2
+ let f a b = { }
Original file line number Diff line number Diff line change 1
-
2
- Syntax error!
3
- tests/parsing/recovery/expression/emptyBlock.res:1:10
4
-
5
- 1 │ let x = {}
6
- 2 │
7
- 3 │ let f = (a, b) => {}
8
-
9
- This let-binding misses an expression
10
-
11
-
12
- Syntax error!
13
- tests/parsing/recovery/expression/emptyBlock.res:3:20
14
-
15
- 1 │ let x = {}
16
- 2 │
17
- 3 │ let f = (a, b) => {}
18
- 4 │
19
-
20
- Missing expression
21
-
22
- let x = ((())[@ns.braces ])
23
- let f a b = ((())[@ns.braces ])
1
+ let x = { }
2
+ let f a b = { }
You can’t perform that action at this time.
0 commit comments