analyzer.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 46 行
SCALA
46 行
/* NSC -- new Scala compiler * Copyright 2005-2007 LAMP/EPFL * @author Martin Odersky */// $Id: Analyzer.scala 14347 2008-03-10 12:00:03Z odersky $package scala.tools.nsc.typechecker/** The main attribution phase. */trait Analyzer extends AnyRef with Contexts with Namers with Typers with Infer with Variances with EtaExpansion with SyntheticMethods with Unapplies{ val global : Global import global._ object namerFactory extends SubComponent { val global: Analyzer.this.global.type = Analyzer.this.global val phaseName = "namer" def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) { def apply(unit: CompilationUnit) { newNamer(rootContext(unit)).enterSym(unit.body) } } } object typerFactory extends SubComponent { val global: Analyzer.this.global.type = Analyzer.this.global val phaseName = "typer" def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) { resetTyper() def apply(unit: CompilationUnit) { unit.body = newTyper(rootContext(unit)).typed(unit.body) } } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?