From 99c4afd9cd0e9414981b31321e83c5e2d5b0544b Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 25 Mar 2024 20:49:14 +0100 Subject: [PATCH] update comments to better describe what's going on (#13348) --- packages/tailwindcss/src/css-parser.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/tailwindcss/src/css-parser.ts b/packages/tailwindcss/src/css-parser.ts index 99794c4f6..fc12fef57 100644 --- a/packages/tailwindcss/src/css-parser.ts +++ b/packages/tailwindcss/src/css-parser.ts @@ -305,8 +305,12 @@ export function parse(input: string) { parent.nodes.push(node) } - // Push the current node to the stack and make it the new parent. + // Push the parent node to the stack, so that we can go back once the + // nested nodes are done. stack.push(parent) + + // Make the current node the new parent, so that nested nodes can be + // attached to it. parent = node // Reset the state for the next node.