Skip to content

Commit a782ada

Browse files
committed
Merge pull request #127 from smarter/add/all-phases
Add support for specifying 'all' for -Xprint, -Yskip, etc
2 parents fae2c3f + 5c7513f commit a782ada

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dotty/tools/dotc/core/Decorators.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,13 @@ object Decorators {
125125

126126
/** Implements a test whether a list of strings representing phases contains
127127
* a given phase. The test returns true if the given phase starts with
128-
* one of the names in the list of strings.
128+
* one of the names in the list of strings, or if the list of strings
129+
* contains "all".
129130
*/
130131
implicit class PhaseListDecorator(val names: List[String]) extends AnyVal {
131132
def containsPhase(phase: Phase): Boolean = phase match {
132133
case phase: TreeTransformer => phase.transformations.exists(containsPhase)
133-
case _ => names exists (phase.name.startsWith)
134+
case _ => names exists (n => n == "all" || phase.name.startsWith(n))
134135
}
135136
}
136137

0 commit comments

Comments
 (0)