-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: support logical assignment and numeric separators (#448)
* upgrade acorn * fix bigint handling in tests * add tests of new syntax * update README.md
- Loading branch information
1 parent
de48cf9
commit bd0a405
Showing
41 changed files
with
1,420 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ const SUPPORTED_VERSIONS = [ | |
8, | ||
9, | ||
10, | ||
11 | ||
11, | ||
12 | ||
]; | ||
|
||
/** | ||
|
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
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
147 changes: 147 additions & 0 deletions
147
tests/fixtures/ecma-version/12/logical-assignment-operators/and.result.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,147 @@ | ||
module.exports = { | ||
"type": "Program", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
7 | ||
], | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
7 | ||
], | ||
"expression": { | ||
"type": "AssignmentExpression", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
7 | ||
], | ||
"operator": "&&=", | ||
"left": { | ||
"type": "Identifier", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 1 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
1 | ||
], | ||
"name": "a" | ||
}, | ||
"right": { | ||
"type": "Identifier", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
6, | ||
7 | ||
], | ||
"name": "b" | ||
} | ||
} | ||
} | ||
], | ||
"sourceType": "script", | ||
"tokens": [ | ||
{ | ||
"type": "Identifier", | ||
"value": "a", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 1 | ||
} | ||
}, | ||
"range": [ | ||
0, | ||
1 | ||
] | ||
}, | ||
{ | ||
"type": "Punctuator", | ||
"value": "&&=", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 5 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
5 | ||
] | ||
}, | ||
{ | ||
"type": "Identifier", | ||
"value": "b", | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"range": [ | ||
6, | ||
7 | ||
] | ||
} | ||
] | ||
}; |
1 change: 1 addition & 0 deletions
1
tests/fixtures/ecma-version/12/logical-assignment-operators/and.src.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 &&= b |
Oops, something went wrong.