[FIR/IR generator] Share visitor-related properties between FIR & IR

This commit is contained in:
Sergej Jaskiewicz
2023-09-19 18:15:25 +02:00
committed by Space Team
parent bdfb3c3ac9
commit 75b509c185
13 changed files with 152 additions and 83 deletions
@@ -38,8 +38,7 @@ internal class FirResolvedImportImpl(
override val importedName: Name?
get() = importedFqName?.shortName()
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
}
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirResolvedImportImpl {
return this
@@ -31,8 +31,7 @@ class FirEmptyExpressionBlock : FirBlock() {
override val statements: List<FirStatement>
get() = emptyList()
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
}
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirEmptyExpressionBlock {
transformOtherChildren(transformer, data)
@@ -31,8 +31,7 @@ internal class FirLazyBlockImpl : FirLazyBlock() {
override val statements: List<FirStatement>
get() = error("FirLazyBlock should be calculated before accessing")
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
}
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirLazyBlockImpl {
transformOtherChildren(transformer, data)
@@ -28,8 +28,7 @@ internal class FirLazyExpressionImpl(
override val annotations: List<FirAnnotation>
get() = error("FirLazyExpression should be calculated before accessing")
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
}
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {}
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirLazyExpressionImpl {
return this