Move Fir*SourceElement to frontend.common, rename to Kt* (complete)

This commit is contained in:
Ilya Chernikov
2021-09-17 12:05:37 +02:00
parent c50c8ad270
commit a65beb2dc5
580 changed files with 2031 additions and 1950 deletions
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.fir.tree.generator
import org.jetbrains.kotlin.KtSourceElement
import org.jetbrains.kotlin.contracts.description.EventOccurrencesRange
import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.descriptors.Modality
@@ -20,7 +21,7 @@ import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.SmartcastStability
import org.jetbrains.kotlin.types.Variance
val sourceElementType = type("fir", "FirSourceElement")
val sourceElementType = type(KtSourceElement::class)
val jumpTargetType = type("fir", "FirTarget")
val constKindType = type("types", "ConstantValueKind")
val operationType = type("fir.expressions", "FirOperation")
@@ -122,9 +122,9 @@ abstract class AbstractFirTreeImplementationConfigurator {
}
fun defaultTypeRefWithSource(typeRefClass: String) {
default("typeRef", "$typeRefClass(source?.fakeElement(FirFakeSourceElementKind.ImplicitTypeRef))")
implementation.arbitraryImportables += ArbitraryImportable("org.jetbrains.kotlin.fir", "FirFakeSourceElementKind")
implementation.arbitraryImportables += ArbitraryImportable("org.jetbrains.kotlin.fir", "fakeElement")
default("typeRef", "$typeRefClass(source?.fakeElement(KtFakeSourceElementKind.ImplicitTypeRef))")
implementation.arbitraryImportables += ArbitraryImportable("org.jetbrains.kotlin", "KtFakeSourceElementKind")
implementation.arbitraryImportables += ArbitraryImportable("org.jetbrains.kotlin", "fakeElement")
}
fun defaultTrue(field: String, withGetter: Boolean = false) {