diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2014-04-21 23:30:58 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2014-04-21 23:31:02 +0200 |
commit | 5c7513f7e1a425978952d5389d23adce81005284 (patch) | |
tree | 4f25f34cd1f0f0ae0f58ead3fd69f54d9f72151a /src/dotty/tools/dotc/core | |
parent | fae2c3f8e646fabedb633aea2f42405f556af602 (diff) | |
download | dotty-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')
-rw-r--r-- | src/dotty/tools/dotc/core/Decorators.scala | 5 |
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)) } } |