[FIR] Move base FirExtension infrastructure to :fir:tree module
This is needed for type attribute extension which is used not only from :resolve module but also from :(de)serialization modules
This commit is contained in:
committed by
TeamCityServer
parent
e26cd74b16
commit
32709151c3
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ abstract class FirExtension(val session: FirSession) {
|
||||
|
||||
abstract val key: FirPluginKey
|
||||
|
||||
internal abstract val extensionType: KClass<out FirExtension>
|
||||
abstract val extensionType: KClass<out FirExtension>
|
||||
|
||||
fun interface Factory<out P : FirExtension> {
|
||||
fun create(session: FirSession): P
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ sealed class DeclarationPredicate {
|
||||
abstract val annotations: Set<AnnotationFqn>
|
||||
abstract val metaAnnotations: Set<AnnotationFqn>
|
||||
|
||||
internal abstract fun <R, D> accept(visitor: DeclarationPredicateVisitor<R, D>, data: D): R
|
||||
abstract fun <R, D> accept(visitor: DeclarationPredicateVisitor<R, D>, data: D): R
|
||||
|
||||
object Any : DeclarationPredicate() {
|
||||
override val annotations: Set<AnnotationFqn>
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* 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.kotlin.fir.extensions.predicate
|
||||
|
||||
internal abstract class DeclarationPredicateVisitor<R, D> {
|
||||
abstract class DeclarationPredicateVisitor<R, D> {
|
||||
abstract fun visitPredicate(predicate: DeclarationPredicate, data: D): R
|
||||
open fun visitAny(predicate: DeclarationPredicate.Any, data: D): R {
|
||||
return visitPredicate(predicate, data)
|
||||
@@ -42,4 +42,4 @@ internal abstract class DeclarationPredicateVisitor<R, D> {
|
||||
open fun visitUnderMetaAnnotated(predicate: UnderMetaAnnotated, data: D): R {
|
||||
return visitMetaAnnotated(predicate, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user