This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1576,7 +1576,7 @@ and parseTernaryExpr leftOperand p =
1576
1576
| _ ->
1577
1577
leftOperand
1578
1578
1579
- and parseEs6ArrowExpression ?parameters p =
1579
+ and parseEs6ArrowExpression ?context ? parameters p =
1580
1580
let startPos = p.Parser. startPos in
1581
1581
Parser. leaveBreadcrumb p Grammar. Es6ArrowExpr ;
1582
1582
let parameters = match parameters with
@@ -1592,7 +1592,7 @@ and parseEs6ArrowExpression ?parameters p =
1592
1592
in
1593
1593
Parser. expect EqualGreater p;
1594
1594
let body =
1595
- let expr = parseExpr p in
1595
+ let expr = parseExpr ?context p in
1596
1596
match returnType with
1597
1597
| Some typ ->
1598
1598
Ast_helper.Exp. constraint_
@@ -2108,7 +2108,7 @@ and parseOperandExpr ~context p =
2108
2108
if (context != WhenExpr ) &&
2109
2109
isEs6ArrowExpression ~in Ternary:(context= TernaryTrueBranchExpr ) p
2110
2110
then
2111
- parseEs6ArrowExpression p
2111
+ parseEs6ArrowExpression ~context p
2112
2112
else
2113
2113
parseUnaryExpr p
2114
2114
in
Original file line number Diff line number Diff line change @@ -4037,6 +4037,9 @@ a =>
4037
4037
4038
4038
let x = @attrOnTernary (truth ? true : false)
4039
4039
let x = @attrOnCondition truth ? true : false
4040
+
4041
+ x ? y => () : onChange
4042
+ let y = <input value onChange = { x ? _ => () : onChange } />
4040
4043
"
4041
4044
`;
4042
4045
Original file line number Diff line number Diff line change @@ -259,3 +259,6 @@ a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaaaaa :
259
259
260
260
let x = @attrOnTernary (truth ? true : false)
261
261
let x = @attrOnCondition truth ? true : false
262
+
263
+ x ? y => () : onChange
264
+ let y = <input value onChange={x ? _ => () : onChange} />
Original file line number Diff line number Diff line change @@ -121,3 +121,6 @@ a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaaaaa :
121
121
122
122
let x = @attrOnTernary (truth ? true : false )
123
123
let x = @attrOnCondition truth ? true : false
124
+
125
+ x ? y => () : onChange
126
+ let y = <input value onChange = {x ? _ => () : onChange } />
You can’t perform that action at this time.
0 commit comments