update comments to better describe what's going on (#13348)

This commit is contained in:
Robin Malfait 2024-03-25 20:49:14 +01:00 • committed by GitHub
parent 19c8fe34fd
commit 99c4afd9cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.