handle destructuring catch in --reduce-test (#4427)

This commit is contained in:
Alex Lam S.L
2020-12-20 03:22:45 +00:00
committed by GitHub
parent f5224ca1f5
commit caea6aac81
5 changed files with 32 additions and 2 deletions

View File

@@ -1714,7 +1714,7 @@ function patch_try_catch(orig, toplevel) {
offset: 0,
tries: [],
} ];
var re = /(?:(?:^|[\s{}):;])try|}\s*catch\s*\(([^)]+)\)|}\s*finally)\s*(?={)/g;
var re = /(?:(?:^|[\s{}):;])try|}\s*catch\s*\(([^)[{]+)\)|}\s*finally)\s*(?={)/g;
while (stack.length) {
var code = stack[0].code;
var offset = stack[0].offset;