[FIR generator] Move Importable interface to common module

This is a step towards commonizing the code generator between
FIR and IR: KT-61970
This commit is contained in:
Sergej Jaskiewicz
2023-09-04 19:34:21 +02:00
committed by Space Team
parent ec9cb8beb6
commit 7a6bffaabb
19 changed files with 39 additions and 2 deletions
@@ -0,0 +1,4 @@
## Common code for the FIR and IR tree generators
The [FIR](../../compiler/fir/tree/tree-generator) and [IR](../../compiler/ir/ir.tree/tree-generator) tree generators, although quite
different, share some common logic. This logic is stored here in this module.
@@ -0,0 +1,15 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
implementation(project(":core:compiler.common"))
}
sourceSets {
"main" {
projectDefault()
}
"test" {}
}
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2019 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.generators.tree
interface Importable {
val type: String
val packageName: String?
val fullQualifiedName: String? get() = packageName?.let { "$it.${type.replace(Regex("<.+>"), "")}" }
}