diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-07-10 11:45:03 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-07-10 12:53:51 +0200 |
commit | f7093b8ac229289c68757e9e4cf7392c4bcbeeb8 (patch) | |
tree | 3fb773a001e8e4b172879d21b668b477acef9253 | |
parent | 7553b0afa9e4a071c7ea1cd51effd57030b66be6 (diff) | |
download | scala-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.scala | 3 |
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 |