[FIR] Support IntegerLiteralTypes

This commit is contained in:
Dmitriy Novozhilov
2019-12-09 15:02:55 +03:00
parent 5577f0f8cb
commit b76c984b26
145 changed files with 1815 additions and 585 deletions
@@ -235,6 +235,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
defaultFalse("safe")
lateinit("calleeReference")
defaultNoReceivers()
kind = OpenClass
}
impl(qualifiedAccessExpression) {
@@ -138,7 +138,8 @@ object NodeConfigurator : AbstractFieldConfigurator() {
returnExpression.configure {
parentArg(jump, "E", function.withArgs("F" to "*"))
+field("result", expression)
+field("result", expression).withTransform()
needTransformOtherChildren()
}
label.configure {
@@ -178,7 +179,7 @@ object NodeConfigurator : AbstractFieldConfigurator() {
constExpression.configure {
withArg("T")
+field("kind", constKindType.withArgs("T"))
+field("kind", constKindType.withArgs("T"), withReplace = true)
+field("value", "T", null)
}
@@ -335,7 +336,7 @@ object NodeConfigurator : AbstractFieldConfigurator() {
withArg("F", variable)
parentArg(callableDeclaration, "F", "F")
+symbol("FirVariableSymbol", "F")
+initializer
+initializer.withTransform()
+field("delegate", expression, nullable = true)
+field("delegateFieldSymbol", delegateFieldSymbolType, "F", nullable = true)
generateBooleanFields("var", "val")
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.fir.tree.generator.context.generatedType
import org.jetbrains.kotlin.fir.tree.generator.context.type
import org.jetbrains.kotlin.fir.types.ConeClassErrorType
import org.jetbrains.kotlin.fir.types.ConeKotlinType
import org.jetbrains.kotlin.ir.expressions.IrConstKind
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
@@ -23,7 +22,7 @@ import org.jetbrains.kotlin.types.Variance
val sourceElementType = type("fir", "FirSourceElement")
val jumpTargetType = type("fir", "FirTarget")
val constKindType = type(IrConstKind::class)
val constKindType = generatedType("expressions", "FirConstKind")
val operationType = type("fir.expressions", "FirOperation")
val classKindType = type(ClassKind::class)
val invocationKindType = type(InvocationKind::class)