transform.scala

来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 35 行

SCALA
35
字号
/* NSC -- new Scala compiler * Copyright 2005-2007 LAMP/EPFL * @author Martin Odersky */// $Id: Transform.scala 12292 2007-07-12 17:05:58Z michelou $package scala.tools.nsc.transform/** <p> *    A base class for transforms. *  </p> *  <p> *    A transform contains a compiler phase which applies a tree transformer. *  </p> * *  @author Martin Odersky *  @version 1.0 */abstract class Transform extends SubComponent {  /** The transformer factory */  protected def newTransformer(unit: global.CompilationUnit): global.Transformer  /** Create a new phase which applies transformer */  def newPhase(prev: scala.tools.nsc.Phase): StdPhase = new Phase(prev)  /** The phase defined by this transform */  class Phase(prev: scala.tools.nsc.Phase) extends StdPhase(prev) {    def apply(unit: global.CompilationUnit) {      newTransformer(unit).transformUnit(unit)    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?