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

Function FunctionDeclaration

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

Source from the content-addressed store, hash-verified

1150 },
1151
1152 FunctionDeclaration(node, { state, next }) {
1153 if (node.id) state.scope.declare(node.id, 'normal', 'function', node);
1154
1155 const scope = state.scope.child(true);
1156 scopes.set(node, scope);
1157
1158 add_params(scope, node.params);
1159 next({ scope });
1160 },
1161
1162 ArrowFunctionExpression(node, { state, next }) {
1163 const scope = state.scope.child(true);

Callers

nothing calls this directly

Calls 5

add_paramsFunction · 0.85
declareMethod · 0.80
setMethod · 0.65
nextFunction · 0.50
childMethod · 0.45

Tested by

no test coverage detected