diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-03 17:31:55 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-03 17:31:55 +0100 |
commit | 3c595635d4c19b682e0cd5642d56f3b3352eb4db (patch) | |
tree | 35a35ce8ba7f2490689156f6fcbd566279bfe3a9 /src/dotty/tools/dotc/typer/FrontEnd.scala | |
parent | 09d5673de8d3a9ddd50c3c221992ede6117e16bf (diff) | |
download | dotty-3c595635d4c19b682e0cd5642d56f3b3352eb4db.tar.gz dotty-3c595635d4c19b682e0cd5642d56f3b3352eb4db.tar.bz2 dotty-3c595635d4c19b682e0cd5642d56f3b3352eb4db.zip |
Phase.runOn is now List[ComliplationUnit] => List[ComliplationUnit]
Allows to alter number of compilation units.
Diffstat (limited to 'src/dotty/tools/dotc/typer/FrontEnd.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/FrontEnd.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala index 4c5e2549b..4f3b03fa1 100644 --- a/src/dotty/tools/dotc/typer/FrontEnd.scala +++ b/src/dotty/tools/dotc/typer/FrontEnd.scala @@ -40,13 +40,14 @@ class FrontEnd extends Phase { record("retainedTypedTrees", unit.tpdTree.treeSize) } - override def runOn(units: List[CompilationUnit])(implicit ctx: Context): Unit = { + override def runOn(units: List[CompilationUnit])(implicit ctx: Context): List[CompilationUnit] = { val unitContexts = units map (unit => ctx.fresh.setCompilationUnit(unit)) unitContexts foreach (parse(_)) record("parsedTrees", ast.Trees.ntrees) unitContexts foreach (enterSyms(_)) unitContexts foreach (typeCheck(_)) record("totalTrees", ast.Trees.ntrees) + unitContexts.map(_.compilationUnit) } override def run(implicit ctx: Context): Unit = { |