diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-19 13:49:03 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-19 13:49:03 +0000 |
commit | ac849228490d5a0e2d3f048d649297d5c59b6ade (patch) | |
tree | 6314f2c06f37e67dec5827c3f94e25cf844a085c /src/compiler/scala/tools/nsc/SubComponent.scala | |
parent | d6c0efe5b4b89a0337f1cdcdabf8c607d81f4ae1 (diff) | |
download | scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.tar.gz scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.tar.bz2 scala-ac849228490d5a0e2d3f048d649297d5c59b6ade.zip |
Switching to the new build system and to the ne...
Switching to the new build system and to the new build system. This is a
MAJOR commit, so be careful when updating.
Diffstat (limited to 'src/compiler/scala/tools/nsc/SubComponent.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/SubComponent.scala | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/SubComponent.scala b/src/compiler/scala/tools/nsc/SubComponent.scala new file mode 100644 index 0000000000..556b6538ad --- /dev/null +++ b/src/compiler/scala/tools/nsc/SubComponent.scala @@ -0,0 +1,29 @@ +/* NSC -- new scala compiler + * Copyright 2005 LAMP/EPFL + * @author Martin Odersky + */ +// $Id$ +package scala.tools.nsc; + +/** An nsc sub-component. + */ +abstract class SubComponent { + + /** The global environment; overridden by instantiation in Global. */ + val global: Global; + + /** The name of the phase */ + val phaseName: String; + + /** New flags defined by the phase which are not valid before */ + def phaseNewFlags: long = 0; + + /** The phase factory */ + def newPhase(prev: Phase): Phase; + + /** A standard phase template */ + abstract class StdPhase(prev: Phase) extends global.GlobalPhase(prev) { + def name = phaseName; + override def newFlags = phaseNewFlags; + } +} |