summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-07 10:41:51 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-07 10:41:51 +0000
commit456e20966295a409efc8d2a4edae36067e486db7 (patch)
tree7a838a8b634c1a4e24ebf3859d7026d419d327c4 /src
parentf507f0ac4ceead4d48bed2aef70b7d37839c9589 (diff)
downloadscala-456e20966295a409efc8d2a4edae36067e486db7.tar.gz
scala-456e20966295a409efc8d2a4edae36067e486db7.tar.bz2
scala-456e20966295a409efc8d2a4edae36067e486db7.zip
Applied Andrew Foggin's patch to allow plugins ...
Applied Andrew Foggin's patch to allow plugins to be run immediately after ther parsing phase. It shouldn't be necessary to special case parsing like this, but I cannot figure out how to untangle to mutually recursive initialiation order constraints.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/plugins/Plugins.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugins.scala b/src/compiler/scala/tools/nsc/plugins/Plugins.scala
index ab0307606f..6f7ac0d84c 100644
--- a/src/compiler/scala/tools/nsc/plugins/Plugins.scala
+++ b/src/compiler/scala/tools/nsc/plugins/Plugins.scala
@@ -142,6 +142,8 @@ trait Plugins { self: Global =>
{
descs match {
case Nil => assert(false); Nil
+ case hd::rest if "parser" == component.runsAfter =>
+ component :: hd :: rest
case hd::rest if hd.phaseName == component.runsAfter =>
hd :: component :: rest
case hd :: rest =>
@@ -158,7 +160,8 @@ trait Plugins { self: Global =>
while (!plugsLeft.isEmpty) {
val nextPlug = plugsLeft.find(plug =>
- descriptors.exists(d => d.phaseName == plug.runsAfter))
+ plug.runsAfter == "parser" ||
+ descriptors.exists(d => d.phaseName == plug.runsAfter))
nextPlug match {
case None =>
error("Failed to load some plugin phases:")