MCPcopy
hub / github.com/webpack/webpack / walkValue

Function walkValue

lib/css/syntax.js:3066–3085  ·  view source on GitHub ↗
(node, parent)

Source from the content-addressed store, hash-verified

3064 * @param {Node | null} parent enclosing node
3065 */
3066 const walkValue = (node, parent) => {
3067 const ty = _soaTy[_ix(node)];
3068 const b = visitors[ty];
3069 let skip = false;
3070 if (b !== undefined && b.enter.length !== 0) {
3071 skipFlag = false;
3072 const e = b.enter;
3073 for (let i = 0; i < e.length; i++) e[i](node, parent, visitorCtx);
3074 skip = skipFlag;
3075 skipFlag = false;
3076 }
3077 if (!skip && (ty === T_FUNCTION || ty === T_SIMPLE_BLOCK)) {
3078 const v = /** @type {Node[]} */ (_soaL0[_ix(node)]);
3079 for (let i = 0; i < v.length; i++) walkValue(v[i], node);
3080 }
3081 if (b !== undefined) {
3082 const x = b.exit;
3083 for (let i = 0; i < x.length; i++) x[i](node, parent, visitorCtx);
3084 }
3085 };
3086
3087 /**
3088 * Walk a structural subtree; an at-rule / qualified-rule's block was parsed

Callers 1

walkRuleFunction · 0.85

Calls 1

_ixFunction · 0.85

Tested by

no test coverage detected