in gdscript/src/main/kotlin/gdscript/psi/utils/PsiGdExprUtil.kt [279:294]
fun getAttrOrCallParentClass(element: PsiElement): String? {
if (element is GdRefIdRef
&& element.parent != null
&& element.parent is GdLiteralEx
) {
val root = element.parent.parent ?: return null
if (root is GdAttributeEx && element.parent.prevSibling != null) {
return GdCommonUtil.returnType(root.firstChild)
}
if (root is GdCallEx && root.prevSibling != null && root.parent is GdAttributeEx) {
return GdCommonUtil.returnType(root.parent.firstChild)
}
}
return null
}