Skip to content

Commit f7093b8

Browse files
denshxeno-by
authored andcommitted
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.
1 parent 7553b0a commit f7093b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/scala/tools/nsc/Global.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
103103
typer.typed(mkCast(tree, pt))
104104
}
105105

106+
/** A spare instance of TreeBuilder left for backwards compatibility. */
107+
lazy val treeBuilder: TreeBuilder { val global: Global.this.type } = new syntaxAnalyzer.ParserTreeBuilder
108+
106109
/** Fold constants */
107110
object constfold extends {
108111
val global: Global.this.type = Global.this

0 commit comments

Comments
 (0)