@@ -102,8 +102,8 @@ object CompilerCommand {
102
102
}
103
103
104
104
def isStandard (s : Setting [? ]): Boolean = ! isAdvanced(s) && ! isPrivate(s)
105
- def isAdvanced (s : Setting [? ]): Boolean = s.name startsWith " -X"
106
- def isPrivate (s : Setting [? ]) : Boolean = s.name startsWith " -Y"
105
+ def isAdvanced (s : Setting [? ]): Boolean = s.name. startsWith( " -X " ) && s.name != " -X"
106
+ def isPrivate (s : Setting [? ]) : Boolean = s.name. startsWith( " -Y " ) && s.name != " -Y"
107
107
108
108
/** Messages explaining usage and options */
109
109
def usageMessage = createUsageMsg(" where possible standard" , shouldExplain = false , isStandard)
@@ -112,7 +112,14 @@ object CompilerCommand {
112
112
113
113
def shouldStopWithInfo = {
114
114
import settings ._
115
- Set (help, Xhelp , Yhelp , showPlugins) exists (_.value)
115
+ Set (help, Xhelp , Yhelp , showPlugins, XshowPhases ) exists (_.value)
116
+ }
117
+
118
+ def phasesMessage : String = {
119
+ (new Compiler ()).phases.map {
120
+ case List (single) => single.phaseName
121
+ case more => more.map(_.phaseName).mkString(" {" , " , " , " }" )
122
+ }.mkString(" \n " )
116
123
}
117
124
118
125
def infoMessage : String = {
@@ -121,6 +128,7 @@ object CompilerCommand {
121
128
else if (Xhelp .value) xusageMessage
122
129
else if (Yhelp .value) yusageMessage
123
130
else if (showPlugins.value) ctx.pluginDescriptions
131
+ else if (XshowPhases .value) phasesMessage
124
132
else " "
125
133
}
126
134
0 commit comments