All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.fir.builder.Context.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/*
 * Copyright 2010-2020 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.builder

import kotlinx.collections.immutable.persistentListOf
import org.jetbrains.kotlin.fir.FirFunctionTarget
import org.jetbrains.kotlin.fir.FirLabel
import org.jetbrains.kotlin.fir.FirLoopTarget
import org.jetbrains.kotlin.fir.FirSourceElementKind
import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
import org.jetbrains.kotlin.fir.types.ConeKotlinType
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name

class Context {
    lateinit var packageFqName: FqName
    var className: FqName = FqName.ROOT
    val localBits: MutableList = mutableListOf()
    val currentClassId get() = ClassId(packageFqName, className, localBits.lastOrNull() ?: false)

    val firFunctionTargets = mutableListOf()
    val calleeNamesForLambda = mutableListOf()
    val firLabels = mutableListOf()
    val firLoopTargets = mutableListOf()
    var capturedTypeParameters = persistentListOf()
    val arraySetArgument = mutableMapOf()

    var forcedElementSourceKind: FirSourceElementKind? = null
    val dispatchReceiverTypesStack = mutableListOf()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy