You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: src/res_core.ml
+8
Original file line number
Diff line number
Diff line change
@@ -2759,6 +2759,14 @@ and parseBracedOrRecordExpr p =
2759
2759
let expr = parseRecordExpr ~startPos [] p in
2760
2760
Parser.expect Rbrace p;
2761
2761
expr
2762
+
(*
2763
+
The branch below takes care of the "braced" expression {async}.
2764
+
The big reason that we need all these branches is that {x} isn't a record with a punned field x, but a braced expression… There's lots of "ambiguity" between a record with a single punned field and a braced expression…
2765
+
What is {x}?
2766
+
1) record {x: x}
2767
+
2) expression x which happens to wrapped in braces
2768
+
Due to historical reasons, we always follow 2
2769
+
*)
2762
2770
|Lident"async"when isEs6ArrowExpression ~inTernary:false p ->
0 commit comments