MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / findRootNode

Function findRootNode

packages/language/src/utils.ts:804–809  ·  view source on GitHub ↗
(node: AstNode)

Source from the content-addressed store, hash-verified

802 * Returns the root node of the given AST node by following the `$container` references.
803 */
804export function findRootNode(node: AstNode): AstNode {
805 while (node.$container) {
806 node = node.$container;
807 }
808 return node;
809}

Callers 1

getDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected