blob: 63775ff1c54bf161cef5e6d834d13348ec4b8fc2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* NSC -- new Scala compiler
* Copyright 2005-2011 LAMP/EPFL
* @author Paul Phillips
*/
package scala.tools.nsc
package settings
/** Taking flag checking to a somewhat higher level. */
trait AestheticSettings {
def settings: Settings
// Some(value) if setting has been set by user, None otherwise.
def optSetting[T](s: Settings#Setting): Option[T] =
if (s.isDefault) None else Some(s.value.asInstanceOf[T])
def script = optSetting[String](settings.script)
def encoding = optSetting[String](settings.encoding)
def sourceReader = optSetting[String](settings.sourceReader)
def debug = settings.debug.value
def declsOnly = false
def deprecation = settings.deprecation.value
def experimental = settings.Xexperimental.value
def fatalWarnings = settings.fatalWarnings.value
def feature = settings.feature.value
def future = settings.future.value
def logClasspath = settings.Ylogcp.value
def printStats = settings.Ystatistics.value
def richExes = settings.YrichExes.value || sys.props.traceSourcePath.isSet
def target = settings.target.value
def unchecked = settings.unchecked.value
def verbose = settings.verbose.value
def virtPatmat = !settings.XoldPatmat.value
/** Derived values */
def jvm = target startsWith "jvm"
def msil = target == "msil"
def verboseDebug = debug && verbose
}
|