@Override
    public void visitElement(@NotNull PsiElement element) {
      if (element.getChildren().length == 0) {
        myResult.append(element.getText());
      }
      else {
        super.visitElement(element);
      }
    }
@Override
    public void visitElement(@NotNull PsiElement element)