Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix right precedence of Hack pipes (#13668)
- Loading branch information
1 parent
8c061f0
commit 3c3f520
Showing
78 changed files
with
975 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...erimental/pipeline-operator/hack-hash-proposal-arrow-function-unparenthesized/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":17}}, | ||
"errors": [ | ||
"SyntaxError: Hack-style pipe body cannot be an unparenthesized arrow function expression; please wrap it in parentheses. (1:6)" | ||
], | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":17}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":17,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":17}}, | ||
"expression": { | ||
"type": "BinaryExpression", | ||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}}, | ||
"left": { | ||
"type": "NumericLiteral", | ||
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}}, | ||
"extra": { | ||
"rawValue": 10, | ||
"raw": "10" | ||
}, | ||
"value": 10 | ||
}, | ||
"operator": "|>", | ||
"right": { | ||
"type": "ArrowFunctionExpression", | ||
"start":6,"end":16,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":16}}, | ||
"id": null, | ||
"generator": false, | ||
"async": false, | ||
"params": [ | ||
{ | ||
"type": "Identifier", | ||
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"x"}, | ||
"name": "x" | ||
} | ||
], | ||
"body": { | ||
"type": "BinaryExpression", | ||
"start":11,"end":16,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":16}}, | ||
"left": { | ||
"type": "Identifier", | ||
"start":11,"end":12,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":12},"identifierName":"x"}, | ||
"name": "x" | ||
}, | ||
"operator": "+", | ||
"right": { | ||
"type": "TopicReference", | ||
"start":15,"end":16,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":16}} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ures/experimental/pipeline-operator/hack-hash-proposal-assignment-logical-and/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}}, | ||
"errors": [ | ||
"SyntaxError: Hack-style pipe body cannot be an unparenthesized assignment expression; please wrap it in parentheses. (1:9)" | ||
], | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}}, | ||
"expression": { | ||
"type": "BinaryExpression", | ||
"start":0,"end":16,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":16}}, | ||
"left": { | ||
"type": "Identifier", | ||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5},"identifierName":"value"}, | ||
"name": "value" | ||
}, | ||
"operator": "|>", | ||
"right": { | ||
"type": "AssignmentExpression", | ||
"start":9,"end":16,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":16}}, | ||
"operator": "&&=", | ||
"left": { | ||
"type": "Identifier", | ||
"start":9,"end":10,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":10},"identifierName":"x"}, | ||
"name": "x" | ||
}, | ||
"right": { | ||
"type": "TopicReference", | ||
"start":15,"end":16,"loc":{"start":{"line":1,"column":15},"end":{"line":1,"column":16}} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
.../fixtures/experimental/pipeline-operator/hack-hash-proposal-assignment-normal/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"errors": [ | ||
"SyntaxError: Hack-style pipe body cannot be an unparenthesized assignment expression; please wrap it in parentheses. (1:9)" | ||
], | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"expression": { | ||
"type": "BinaryExpression", | ||
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}}, | ||
"left": { | ||
"type": "Identifier", | ||
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5},"identifierName":"value"}, | ||
"name": "value" | ||
}, | ||
"operator": "|>", | ||
"right": { | ||
"type": "AssignmentExpression", | ||
"start":9,"end":19,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":19}}, | ||
"operator": "=", | ||
"left": { | ||
"type": "ArrayPattern", | ||
"start":9,"end":15,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":15}}, | ||
"elements": [ | ||
{ | ||
"type": "Identifier", | ||
"start":10,"end":11,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":11},"identifierName":"x"}, | ||
"name": "x" | ||
}, | ||
{ | ||
"type": "Identifier", | ||
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"y"}, | ||
"name": "y" | ||
} | ||
] | ||
}, | ||
"right": { | ||
"type": "TopicReference", | ||
"start":18,"end":19,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":19}} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.