aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Main.scala
blob: 7c132ef0451b3eef3b43e2feab1c1d5a83be21c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* NSC -- new Scala compiler
 * Copyright 2005-2013 LAMP/EPFL
 * @author  Martin Odersky
 */
package dotty.tools
package dotc

import core.Contexts.Context
import reporting.Reporter

/* To do:
 *   - simplify hk types
 *   - make use of AndOrType
 *   - review isSubType
 *   - have a second look at normalization (leave at method types if pt is method type?)
 *   - Check usages of isAliasType and replace where possible by looking at the info. Look for #dealias
 *   - Don't open package objects from class files if they are present in source
 */

object Main extends Driver {
  def resident(compiler: Compiler): Reporter = unsupported("resident") /*loop { line =>
    val command = new CompilerCommand(line split "\\s+" toList, new Settings(scalacError))
    compiler.reporter.reset()
    new compiler.Run() compile command.files
  }*/

  override def newCompiler(): Compiler = new Compiler

  override def doCompile(compiler: Compiler, fileNames: List[String])(implicit ctx: Context): Reporter = {
    if (new config.Settings.Setting.SettingDecorator[Boolean](ctx.base.settings.resident).value(ctx))
      resident(compiler)
    else
      super.doCompile(compiler, fileNames)
  }
}