ca52f554a1/org.scala-refactoring.library/src/main/scala/scala/tools/refactoring/common/PimpedTrees.scala

28048e468f2f0a7b1479d2975df94b27e284e73eca52f554a13ca631512f929d8a0e10ab0cb65831
92
  }
92
  }
93
  
93
  
94
  def escapeScalaKeywordsForImport(n: String) = {
94
  def escapeScalaKeywordsForImport(n: String) = {
95
    if(global.nme.keywords.contains(n.toTermName) && n.toTermName != nme.USCOREkw) "`"+ n +"`" else n
95
    val name = newTermName(n)
96
    if(global.nme.keywords.contains(name) && name != nme.USCOREkw) "`"+ n +"`" else n
96
  }
97
  }
97
  /**
98
  /**
98
   * Searches for a Symbol of a name in the type members of a tree.
99
   * Searches for a Symbol of a name in the type members of a tree.
...
...
752
    }
753
    }
753
    def errorSubtrees = Nil
754
    def errorSubtrees = Nil
754
  }
755
  }
755
  
756
  object NameTree {
757
    def apply(name: String) = new NameTree(newTermName(name))
758
  }
756
  /**
759
  /**
757
   * Represent a modifier as a tree, including its position.
760
   * Represent a modifier as a tree, including its position.
758
   */
761
   */