console.log(d)
console.log(e)
}
+ let err = $ref(null)
+ try {
+ } catch (err) {
+ console.log(err)
+ }
`)
expect(code).toMatch('console.log(a)')
expect(code).toMatch('console.log(b.value)')
expect(code).toMatch('console.log(c)')
expect(code).toMatch('console.log(d.value)')
expect(code).toMatch('console.log(e)')
+ expect(code).toMatch('console.log(err)')
assertCode(code)
})
return
}
+ // catch param
+ if (node.type === 'CatchClause') {
+ scopeStack.push((currentScope = {}))
+ if (node.param && node.param.type === 'Identifier') {
+ registerBinding(node.param)
+ }
+ walkScope(node.body)
+ return
+ }
+
// non-function block scopes
if (node.type === 'BlockStatement' && !isFunctionType(parent!)) {
scopeStack.push((currentScope = {}))