Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support optional catch binding (stage 4 / ES2019) (#2455)
* support optional catch binding (stage 4 / ES2019) * correct test indentation: looks like this is a tabs codebase(!) * switch default ecmaVersion to 2019; remove acorn options from option catch param test
- Loading branch information
1 parent
6eb8036
commit 007f42b
Showing
5 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'allows optional catch binding with appropriate acorn settings', | ||
minNodeVersion: 10, | ||
exports(exports) { | ||
assert.equal(exports.foo, true); | ||
} | ||
}; |
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,7 @@ | ||
export let foo; | ||
|
||
try { | ||
foo(); | ||
} catch { | ||
foo = true; | ||
} |