FIR/UAST: commonize KotlinEvaluatableUElement

This commit is contained in:
Jinseong Jeon
2021-05-25 00:03:41 -07:00
committed by Ilya Kirillov
parent ce10410aba
commit 6b5bddeed7
5 changed files with 31 additions and 34 deletions
@@ -19,4 +19,6 @@ interface BaseKotlinUastResolveProviderService {
fun resolveToDeclaration(ktExpression: KtExpression): PsiElement?
fun getExpressionType(uExpression: UExpression): PsiType?
fun evaluate(uExpression: UExpression): Any?
}
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.uast.kotlin
import org.jetbrains.uast.UExpression
interface KotlinEvaluatableUElement : UExpression {
val baseResolveProviderService: BaseKotlinUastResolveProviderService
override fun evaluate(): Any? {
return baseResolveProviderService.evaluate(this)
}
}