MCPcopy
hub / github.com/sveltejs/svelte / CatchClause

Function CatchClause

packages/svelte/src/compiler/phases/scope.js:1219–1232  ·  view source on GitHub ↗
(node, { state, next })

Source from the content-addressed store, hash-verified

1217 },
1218
1219 CatchClause(node, { state, next }) {
1220 if (node.param) {
1221 const scope = state.scope.child(true);
1222 scopes.set(node, scope);
1223
1224 for (const id of extract_identifiers(node.param)) {
1225 scope.declare(id, 'normal', 'let');
1226 }
1227
1228 next({ scope });
1229 } else {
1230 next();
1231 }
1232 },
1233
1234 EachBlock(node, { state, visit }) {
1235 visit(node.expression);

Callers

nothing calls this directly

Calls 5

extract_identifiersFunction · 0.90
declareMethod · 0.80
setMethod · 0.65
nextFunction · 0.50
childMethod · 0.45

Tested by

no test coverage detected