aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Decorators.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2014-04-21 23:30:58 +0200
committerGuillaume Martres <smarter@ubuntu.com>2014-04-21 23:31:02 +0200
commit5c7513f7e1a425978952d5389d23adce81005284 (patch)
tree4f25f34cd1f0f0ae0f58ead3fd69f54d9f72151a /src/dotty/tools/dotc/core/Decorators.scala
parentfae2c3f8e646fabedb633aea2f42405f556af602 (diff)
downloaddotty-5c7513f7e1a425978952d5389d23adce81005284.tar.gz
dotty-5c7513f7e1a425978952d5389d23adce81005284.tar.bz2
dotty-5c7513f7e1a425978952d5389d23adce81005284.zip
Add support for specifying 'all' for -Xprint, -Yskip, etc
Diffstat (limited to 'src/dotty/tools/dotc/core/Decorators.scala')
-rw-r--r--src/dotty/tools/dotc/core/Decorators.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Decorators.scala b/src/dotty/tools/dotc/core/Decorators.scala
index 25b5dbabc..155ea87e0 100644
--- a/src/dotty/tools/dotc/core/Decorators.scala
+++ b/src/dotty/tools/dotc/core/Decorators.scala
@@ -125,12 +125,13 @@ object Decorators {
/** Implements a test whether a list of strings representing phases contains
* a given phase. The test returns true if the given phase starts with
- * one of the names in the list of strings.
+ * one of the names in the list of strings, or if the list of strings
+ * contains "all".
*/
implicit class PhaseListDecorator(val names: List[String]) extends AnyVal {
def containsPhase(phase: Phase): Boolean = phase match {
case phase: TreeTransformer => phase.transformations.exists(containsPhase)
- case _ => names exists (phase.name.startsWith)
+ case _ => names exists (n => n == "all" || phase.name.startsWith(n))
}
}