MCPcopy Create free account
hub / github.com/tailwindlabs/tailwindcss / append

Function append

packages/tailwindcss/src/selector-parser.ts:183–193  ·  view source on GitHub ↗
(node: SelectorAstNode)

Source from the content-addressed store, hash-verified

181 }
182
183 function append(node: SelectorAstNode) {
184 let existing = target[target.length - 1]
185
186 if (existing?.kind === 'compound') {
187 existing.nodes.push(node)
188 } else if (existing && existing.kind !== 'list' && existing.kind !== 'combinator') {
189 target[target.length - 1] = compound([existing, node])
190 } else {
191 target.push(node)
192 }
193 }
194
195 for (let i = 0; i < input.length; i++) {
196 let currentChar = input.charCodeAt(i)

Callers 1

parseFunction · 0.85

Calls 2

compoundFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected