PsiElement (PsiElement previousLeaf) { while ((previousLeaf instanceof PsiWhiteSpace || previousLeaf instanceof PsiComment || previousLeaf instanceof PsiErrorElement)) { previousLeaf = previousLeaf.getPrevSibling(); } return previousLeaf; }