Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 2x 2x 2x 2x 2x 2x 2x 2x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x 3769x | /** @import { ArrowFunctionExpression, FunctionDeclaration, FunctionExpression } from 'estree' */ /** @import { Context } from '../../types' */ /** * @param {ArrowFunctionExpression | FunctionExpression | FunctionDeclaration} node * @param {Context} context */ export function visit_function(node, context) { // TODO retire this in favour of a more general solution based on bindings node.metadata = { // module context -> already hoisted hoistable: context.state.ast_type === 'module' ? 'impossible' : false, hoistable_params: [], scope: context.state.scope }; context.next({ ...context.state, function_depth: context.state.function_depth + 1 }); } |