PyExpression () { PsiElement child = getLastChild(); while (child != null && !(child instanceof PyExpression)) { if (child instanceof PsiErrorElement) return null; // incomplete assignment operator can't be analyzed properly, bail out. child = child.getPrevSibling(); } return (PyExpression)child; }