From 456e20966295a409efc8d2a4edae36067e486db7 Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn Date: Fri, 7 Mar 2008 10:41:51 +0000 Subject: 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. --- src/compiler/scala/tools/nsc/plugins/Plugins.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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:") -- cgit v1.2.3