diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-02-08 15:35:43 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-04-08 09:20:24 -0700 |
commit | 996d066bb3ef0fc91acab18a5502bb649929881a (patch) | |
tree | 22d59bd700b04f04c40d3c2405bf935415880a68 /src | |
parent | b60de05a2e1257d16b7876856e26feec7bb81870 (diff) | |
download | scala-996d066bb3ef0fc91acab18a5502bb649929881a.tar.gz scala-996d066bb3ef0fc91acab18a5502bb649929881a.tar.bz2 scala-996d066bb3ef0fc91acab18a5502bb649929881a.zip |
SI-3368 Promote xml option to -Xxml
As long as Scala does XML literals, there is probably parsing
behavior worth configuring.
Therefore, the umbrella option is promoted to `-Xxml`.
It was tempting to make it `-XML`, but we resisted.
Diffstat (limited to 'src')
3 files changed, 14 insertions, 14 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala index edee1e296d..52b8a51a79 100755 --- a/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/MarkupParsers.scala @@ -234,7 +234,7 @@ trait MarkupParsers { def content: Buffer[Tree] = { val ts = new ArrayBuffer[Tree] - val coalescing = settings.YxmlSettings.isCoalescing + val coalescing = settings.XxmlSettings.isCoalescing @tailrec def loopContent(): Unit = if (xEmbeddedBlock) { ts append xEmbeddedExpr diff --git a/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala index 90610ab2e6..99399e363f 100755 --- a/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala @@ -115,7 +115,7 @@ abstract class SymbolicXMLBuilder(p: Parsers#Parser, preserveWS: Boolean) { final def entityRef(pos: Position, n: String) = atPos(pos)( New(_scala_xml_EntityRef, LL(const(n))) ) - private def coalescing = settings.YxmlSettings.isCoalescing + private def coalescing = settings.XxmlSettings.isCoalescing // create scala.xml.Text here <: scala.xml.Node final def text(pos: Position, txt: String): Tree = atPos(pos) { diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala index e10b3bc259..b783e80db9 100644 --- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala @@ -139,6 +139,18 @@ trait ScalaSettings extends AbsScalaSettings val XnoPatmatAnalysis = BooleanSetting ("-Xno-patmat-analysis", "Don't perform exhaustivity/unreachability analysis. Also, ignore @switch annotation.") val XfullLubs = BooleanSetting ("-Xfull-lubs", "Retains pre 2.10 behavior of less aggressive truncation of least upper bounds.") + // XML parsing options + object XxmlSettings extends MultiChoiceEnumeration { + val coalescing = Value + def isCoalescing = Xxml contains coalescing + } + val Xxml = MultiChoiceSetting( + name = "-Xxml", + helpArg = "property", + descr = "Configure XML parsing", + domain = XxmlSettings + ) + /** Compatibility stubs for options whose value name did * not previously match the option name. */ @@ -305,18 +317,6 @@ trait ScalaSettings extends AbsScalaSettings ) withPostSetHook { _ => scala.reflect.internal.util.Statistics.enabled = true } } - // XML parsing options (transitional in 2.11) - object YxmlSettings extends MultiChoiceEnumeration { - val coalescing = Value - def isCoalescing = Yxml contains coalescing - } - val Yxml = MultiChoiceSetting( - name = "-Yxml", - helpArg = "property", - descr = "Configure XML parsing", - domain = YxmlSettings - ) - def YstatisticsEnabled = Ystatistics.value.nonEmpty /** Area-specific debug output. |