MCPcopy Create free account
hub / github.com/nodejs/node / ClassDeclaration

Function ClassDeclaration

lib/internal/repl/await.js:31–41  ·  view source on GitHub ↗
(node, state, c)

Source from the content-addressed store, hash-verified

29const noop = FunctionPrototype;
30const visitorsWithoutAncestors = {
31 ClassDeclaration(node, state, c) {
32 if (isTopLevelDeclaration(state)) {
33 state.prepend(node, `${node.id.name}=`);
34 ArrayPrototypePush(
35 state.hoistedDeclarationStatements,
36 `let ${node.id.name}; `,
37 );
38 }
39
40 walk.base.ClassDeclaration(node, state, c);
41 },
42 ForOfStatement(node, state, c) {
43 if (node.await === true) {
44 state.containsAwait = true;

Callers

nothing calls this directly

Calls 1

isTopLevelDeclarationFunction · 0.70

Tested by

no test coverage detected