import { BaseUI5Node } from "@ui5-language-assistant/semantic-model-types" ; export function isRootSymbol ( node ) { switch ( node . kind ) { case "UI5Class" : case "UI5Enum" : case "UI5Namespace" : case "UI5Interface" : case "UI5Typedef" : case "UI5Function" : return true ; default : return false ; } } export function getRootSymbolParent ( node ) { let current = node ; while ( current !== undefined && ! isRootSymbol ( current ) ) { current = node . parent ; } return current ; }