summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-04-25 15:00:09 -0700
committerJakob Odersky <jakob@odersky.com>2016-07-15 01:20:32 -0700
commit543d719dce062e6ea99c21c7320def711af1cf9e (patch)
treedb6230e5667241dc007788563510c3b390368d6c /src/compiler/scala/tools/nsc/Global.scala
parent4e564efb04e508ccc0f479cf1a25331501927d88 (diff)
downloadscala-543d719dce062e6ea99c21c7320def711af1cf9e.tar.gz
scala-543d719dce062e6ea99c21c7320def711af1cf9e.tar.bz2
scala-543d719dce062e6ea99c21c7320def711af1cf9e.zip
Retain javadoc comments in scaladoc
* Hook into java parser to generate doc comments * Generate empty trees for java implementation bodies
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 9d6693c00f..d4c2896c5c 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -411,7 +411,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
override val initial = true
}
- import syntaxAnalyzer.{ UnitScanner, UnitParser }
+ import syntaxAnalyzer.{ UnitScanner, UnitParser, JavaUnitParser }
// !!! I think we're overdue for all these phase objects being lazy vals.
// There's no way for a Global subclass to provide a custom typer
@@ -1042,6 +1042,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
def newUnitParser(code: String, filename: String = "<console>"): UnitParser =
newUnitParser(newCompilationUnit(code, filename))
+ def newJavaUnitParser(unit: CompilationUnit): JavaUnitParser = new JavaUnitParser(unit)
+
/** A Run is a single execution of the compiler on a set of units.
*/
class Run extends RunContextApi with RunReporting with RunParsing {