MCPcopy
hub / github.com/webpack/webpack / addScopeSymbols

Function addScopeSymbols

lib/util/concatenate.js:174–185  ·  view source on GitHub ↗
(s, nameSet, scopeSet1, scopeSet2)

Source from the content-addressed store, hash-verified

172 * @param {ScopeSet} scopeSet2 scope set 2
173 */
174const addScopeSymbols = (s, nameSet, scopeSet1, scopeSet2) => {
175 let scope = s;
176 while (scope) {
177 if (scopeSet1.has(scope)) break;
178 if (scopeSet2.has(scope)) break;
179 scopeSet1.add(scope);
180 for (const variable of scope.variables) {
181 nameSet.add(variable.name);
182 }
183 scope = scope.upper;
184 }
185};
186
187const RESERVED_NAMES = new Set(
188 [

Callers 4

codeGenerationMethod · 0.85
_findNewNameMethod · 0.85

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected