From f7093b8ac229289c68757e9e4cf7392c4bcbeeb8 Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Wed, 10 Jul 2013 11:45:03 +0200 Subject: 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. --- src/compiler/scala/tools/nsc/Global.scala | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3