diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-10-04 22:30:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 05:30:14 +0800 |
commit | 8f0521d51d0292cc84782628cda1a9d16b083ed6 (patch) | |
tree | add858505f6b35a72f76f0a19c5d36f222432725 /lib/output.js | |
parent | f9946767c9e517561253eed22558fb154daf84d1 (diff) | |
download | tracifyjs-8f0521d51d0292cc84782628cda1a9d16b083ed6.tar.gz tracifyjs-8f0521d51d0292cc84782628cda1a9d16b083ed6.zip |
retrofit `try-catch-finally` as block-scoped (#4178)
- support optional catch binding
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/output.js b/lib/output.js index c2fc964a..d99c61b8 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1099,10 +1099,12 @@ function OutputStream(options) { DEFPRINT(AST_Catch, function(output) { var self = this; output.print("catch"); - output.space(); - output.with_parens(function() { - self.argname.print(output); - }); + if (self.argname) { + output.space(); + output.with_parens(function() { + self.argname.print(output); + }); + } output.space(); print_braced(self, output); }); |