FIR/UAST: commonize KotlinEvaluatableUElement
This commit is contained in:
committed by
Ilya Kirillov
parent
ce10410aba
commit
6b5bddeed7
+2
@@ -19,4 +19,6 @@ interface BaseKotlinUastResolveProviderService {
|
||||
fun resolveToDeclaration(ktExpression: KtExpression): PsiElement?
|
||||
|
||||
fun getExpressionType(uExpression: UExpression): PsiType?
|
||||
|
||||
fun evaluate(uExpression: UExpression): Any?
|
||||
}
|
||||
|
||||
+16
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user