infotransformers.scala

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

SCALA
44
字号
/* NSC -- new Scala compiler * Copyright 2005-2007 LAMP/EPFL * @author  Martin Odersky */// $Id: InfoTransformers.scala 12390 2007-07-23 12:19:46Z michelou $package scala.tools.nsc.symtabtrait InfoTransformers {  self: SymbolTable =>  abstract class InfoTransformer {    var prev: InfoTransformer = this    var next: InfoTransformer = this    val pid: Phase#Id    val changesBaseClasses: Boolean    def transform(sym: Symbol, tpe: Type): Type    def insert(that: InfoTransformer) {      assert(this.pid != that.pid)      if (that.pid < this.pid) {        prev insert that      } else if (next.pid <= that.pid && next.pid != NoPhase.id) {        next insert that      } else {        that.next = next        that.prev = this        next.prev = that        this.next = that      }    }    def nextFrom(from: Phase#Id): InfoTransformer =      if (from == this.pid) this      else if (from < this.pid)        if (prev.pid < from) this        else prev.nextFrom(from);      else if (next.pid == NoPhase.id) next      else next.nextFrom(from)  }}

⌨️ 快捷键说明

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