arrow-meta / arrow.meta.phases / CompilerContext

CompilerContext

open class CompilerContext : ElementScope

The Compiler Context represents the environment received by all plugins. The Compiler Context will get more services as they become relevant overtime to the development of compiler plugins.

Constructors

| <init> | The Compiler Context represents the environment received by all plugins. The Compiler Context will get more services as they become relevant overtime to the development of compiler plugins.CompilerContext(project: Project, messageCollector: MessageCollector? = null, scope: ElementScope = ElementScope.default(project), ktPsiElementFactory: KtPsiFactory = KtPsiFactory(project, false), eval: (String) -> Any? = { KotlinJsr223JvmLocalScriptEngineFactory().scriptEngine.eval(it) }) |

Properties

analysedDescriptors val analysedDescriptors: MutableList<DeclarationDescriptor>
analysisPhaseCanBeRewind val analysisPhaseCanBeRewind: AtomicBoolean
analysisPhaseWasRewind val analysisPhaseWasRewind: AtomicBoolean
bindingTrace var bindingTrace: BindingTrace?
componentProvider var componentProvider: ComponentProvider?
configuration var configuration: CompilerConfiguration?
ctx val ctx: CompilerContext
eval val eval: (String) -> Any?
ktPsiElementFactory val ktPsiElementFactory: KtPsiFactory
messageCollector val messageCollector: MessageCollector?
module var module: ModuleDescriptor?
project open val project: Project
proofCache val proofCache: ConcurrentHashMap<ModuleDescriptor, ProofsCache>
quotes val quotes: MutableList<QuoteDefinition<out KtElement, out KtElement, out Scope<KtElement>>>
scope val scope: ElementScope

Extension Functions

changeSource fun CompilerContext.changeSource(file: KtFile, newSource: String, rootFile: KtFile, sourcePath: String? = null): KtFile
evaluateDependsOn fun <T> CompilerContext.evaluateDependsOn(noRewindablePhase: () -> T?, rewindablePhase: (Boolean) -> T?): T?
evaluateDependsOnRewindableAnalysisPhase fun <T> CompilerContext.evaluateDependsOnRewindableAnalysisPhase(evaluation: () -> T?): T?
transformFile fun <K : KtElement> CompilerContext.transformFile(ktFile: KtFile, mutations: List<Transform<K>>, match: K.() -> Boolean): List<KtFile>
updateFile fun <K : KtElement> CompilerContext.updateFile(mutations: List<Transform<K>>, file: KtFile, match: K.() -> Boolean): List<KtFile>
updateFiles fun <K : KtElement> CompilerContext.updateFiles(result: ArrayList<KtFile>, fileMutations: List<Pair<KtFile, List<Transform<K>>>>, match: K.() -> Boolean): Unit

Do you like Arrow?

Arrow Org
<