summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-07-10 11:45:03 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-07-10 12:53:51 +0200
commitf7093b8ac229289c68757e9e4cf7392c4bcbeeb8 (patch)
tree3fb773a001e8e4b172879d21b668b477acef9253
parent7553b0afa9e4a071c7ea1cd51effd57030b66be6 (diff)
downloadscala-f7093b8ac229289c68757e9e4cf7392c4bcbeeb8.tar.gz
scala-f7093b8ac229289c68757e9e4cf7392c4bcbeeb8.tar.bz2
scala-f7093b8ac229289c68757e9e4cf7392c4bcbeeb8.zip
backward compatibility for TreeBuilder
Reintroduces treeBuilder at its old location (Global.treeBuilder) by routing it from the new location (Parsers.treeBuilder) for the sake of being friendly to tools that might depend on it.
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index ed97f78032..ea6543bb71 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -103,6 +103,9 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
typer.typed(mkCast(tree, pt))
}
+ /** A spare instance of TreeBuilder left for backwards compatibility. */
+ lazy val treeBuilder: TreeBuilder { val global: Global.this.type } = new syntaxAnalyzer.ParserTreeBuilder
+
/** Fold constants */
object constfold extends {
val global: Global.this.type = Global.this