diff options
author | Paul Phillips <paulp@improving.org> | 2009-05-09 03:53:41 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-05-09 03:53:41 +0000 |
commit | 2ea3b94ee2519e01a3e1658909afeb33e7e9ebe2 (patch) | |
tree | 9bb2044c595fe260c352a00cf98bb2ecece50437 /test/disabled/neg/plugin-before-parser/src | |
parent | f7ab13b08e085c3bf94d857fc9648ee724e4cb08 (diff) | |
download | scala-2ea3b94ee2519e01a3e1658909afeb33e7e9ebe2.tar.gz scala-2ea3b94ee2519e01a3e1658909afeb33e7e9ebe2.tar.bz2 scala-2ea3b94ee2519e01a3e1658909afeb33e7e9ebe2.zip |
Organized disabled directory so it works with p...
Organized disabled directory so it works with partest. You can run
./partest --srcpath disabled to run the tests in that location. Fixed a
few tests in disabled and pending and moved to files.
Diffstat (limited to 'test/disabled/neg/plugin-before-parser/src')
-rw-r--r-- | test/disabled/neg/plugin-before-parser/src/ThePlugin.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/disabled/neg/plugin-before-parser/src/ThePlugin.scala b/test/disabled/neg/plugin-before-parser/src/ThePlugin.scala new file mode 100644 index 0000000000..8714a55dc4 --- /dev/null +++ b/test/disabled/neg/plugin-before-parser/src/ThePlugin.scala @@ -0,0 +1,32 @@ +package scala.test.plugins + +import scala.tools.nsc +import nsc.Global +import nsc.Phase +import nsc.plugins.Plugin +import nsc.plugins.PluginComponent + +class ThePlugin(val global: Global) extends Plugin { + import global._ + + val name = "beforeparser" + val description = "Declares one plugin that wants to be before the parser phase" + val components = List[PluginComponent](thePhase) + + private object thePhase extends PluginComponent { + val global = ThePlugin.this.global + + val runsAfter = List[String]() + override val runsBefore = List[String]("parser") + + val phaseName = ThePlugin.this.name + + def newPhase(prev: Phase) = new ThePhase(prev) + } + + private class ThePhase(prev: Phase) extends Phase(prev) { + def name = ThePlugin.this.name + def run {} + } +} + |