MCPcopy Index your code
hub / github.com/nodejs/node / registerVariableDeclarationIdentifiers

Function registerVariableDeclarationIdentifiers

lib/internal/repl/await.js:97–116  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

95 ['let', []],
96 ];
97 function registerVariableDeclarationIdentifiers(node) {
98 switch (node.type) {
99 case 'Identifier':
100 ArrayPrototypePush(
101 variableIdentifiersToHoist[variableKind === 'var' ? 0 : 1][1],
102 node.name,
103 );
104 break;
105 case 'ObjectPattern':
106 ArrayPrototypeForEach(node.properties, (property) => {
107 registerVariableDeclarationIdentifiers(property.value || property.argument);
108 });
109 break;
110 case 'ArrayPattern':
111 ArrayPrototypeForEach(node.elements, (element) => {
112 registerVariableDeclarationIdentifiers(element);
113 });
114 break;
115 }
116 }
117
118 ArrayPrototypeForEach(node.declarations, (decl) => {
119 registerVariableDeclarationIdentifiers(decl.id);

Callers 1

VariableDeclarationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected