( node: Node, parents: Node[] = [] )
| 297 | } |
| 298 | |
| 299 | export function* walkWithParents( |
| 300 | node: Node, |
| 301 | parents: Node[] = [] |
| 302 | ): Generator<[Node, Node[]]> { |
| 303 | yield [node, parents]; |
| 304 | for (const child of [...Object.values(node.slots), ...node.children]) |
| 305 | yield* walkWithParents(child, [...parents, node]); |
| 306 | } |
| 307 | |
| 308 | function hasValidLocation( |
| 309 | error: ValidationError |