Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: simplify toAssignable on ParenthesizedExpression
- Loading branch information
Showing
4 changed files
with
146 additions
and
7 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
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/core/uncategorised/567/input.js
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 @@ | ||
(!a) += 1 | ||
This comment has been minimized.
Sorry, something went wrong. |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/core/uncategorised/567/options.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,3 @@ | ||
{ | ||
"createParenthesizedExpressions": true | ||
} |
138 changes: 138 additions & 0 deletions
138
packages/babel-parser/test/fixtures/core/uncategorised/567/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,138 @@ | ||
{ | ||
"type": "File", | ||
"start": 0, | ||
"end": 9, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"errors": [ | ||
"SyntaxError: Invalid left-hand side in parenthesized expression (1:1)" | ||
], | ||
"program": { | ||
"type": "Program", | ||
"start": 0, | ||
"end": 9, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start": 0, | ||
"end": 9, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"expression": { | ||
"type": "AssignmentExpression", | ||
"start": 0, | ||
"end": 9, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"operator": "+=", | ||
"left": { | ||
"type": "ParenthesizedExpression", | ||
"start": 0, | ||
"end": 4, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 4 | ||
} | ||
}, | ||
"expression": { | ||
"type": "UnaryExpression", | ||
"start": 1, | ||
"end": 3, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 3 | ||
} | ||
}, | ||
"operator": "!", | ||
"prefix": true, | ||
"argument": { | ||
"type": "Identifier", | ||
"start": 2, | ||
"end": 3, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 3 | ||
}, | ||
"identifierName": "a" | ||
}, | ||
"name": "a" | ||
} | ||
} | ||
}, | ||
"right": { | ||
"type": "NumericLiteral", | ||
"start": 8, | ||
"end": 9, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 9 | ||
} | ||
}, | ||
"extra": { | ||
"rawValue": 1, | ||
"raw": "1" | ||
}, | ||
"value": 1 | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
Please don't create a new uncategorised test 馃槄
New tests should all have a meaningful name.