protected @Nullable <T extends PsiElement> T findLastChildByType(IElementType type) {
    PsiElement child = getLastChild();
    while (child != null) {
      final ASTNode node = child.getNode();
      if (node != null && node.getElementType() == type) return (T)child;
      child = child.getPrevSibling();
    }
    return null;
  }
protected @Nullable <T extends PsiElement> T findLastChildByType(IElementType type)