aboutsummaryrefslogtreecommitdiff
path: root/src/CompilerAPI.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CompilerAPI.kt')
-rw-r--r--src/CompilerAPI.kt11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/CompilerAPI.kt b/src/CompilerAPI.kt
index b68c0354..756cd915 100644
--- a/src/CompilerAPI.kt
+++ b/src/CompilerAPI.kt
@@ -13,13 +13,6 @@ import org.jetbrains.jet.lang.resolve.*
import org.jetbrains.jet.lang.psi.*
import org.jetbrains.jet.analyzer.*
-private fun getClasspath(paths: KotlinPaths): MutableList<File> {
- val classpath = arrayListOf<File>()
- classpath.addAll(PathUtil.getJdkClassesRoots())
- classpath.add(paths.getRuntimePath())
- return classpath
-}
-
private fun getAnnotationsPath(paths: KotlinPaths, arguments: K2JVMCompilerArguments): MutableList<File> {
val annotationsPath = arrayListOf<File>()
annotationsPath.add(paths.getJdkAnnotationsPath())
@@ -55,4 +48,6 @@ private fun JetCoreEnvironment.analyze(messageCollector: MessageCollector): Bind
return exhaust!!.getBindingContext()
}
-fun AnalyzerWithCompilerReport.analyzeAndReport(files: List<JetFile>, analyser: () -> AnalyzeExhaust) = analyzeAndReport(analyser, files) \ No newline at end of file
+fun AnalyzerWithCompilerReport.analyzeAndReport(files: List<JetFile>, analyser: () -> AnalyzeExhaust) = analyzeAndReport(analyser, files)
+
+fun BindingContext.getPackageFragment(file: JetFile) = get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, file)