MCPcopy
hub / github.com/irbis-sh/zen-desktop / emitExt

Function emitExt

jslibs/extended-css/src/parse/selectorList/plan.ts:37–48  ·  view source on GitHub ↗
(name: keyof typeof extPseudoClasses, args: string)

Source from the content-addressed store, hash-verified

35 };
36
37 const emitExt = (name: keyof typeof extPseudoClasses, args: string) => {
38 const extClass = extPseudoClasses[name];
39 if (!extClass) {
40 throw new Error(`Unknown extended pseudo-class ":${name}"`);
41 }
42 if (extClass.requiresContext && !haveContextualStep) {
43 steps.push(new RawQuery('*'));
44 haveContextualStep = true;
45 }
46 steps.push(new extClass(args));
47 haveContextualStep = true;
48 };
49
50 // ---------- Relative selector (starts with a combinator) ----------
51 const startsWithCombinator = tokens[0].kind === 'comb';

Callers 1

planFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected