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

.kotlin.kotlin-compiler.1.2.71.source-code.QualifiedExpressionWithCallSelectorAccessTranslator.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/*
 * Copyright 2010-2018 JetBrains s.r.o. 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.js.translate.reference

import org.jetbrains.kotlin.js.backend.ast.JsExpression
import org.jetbrains.kotlin.js.translate.context.TranslationContext
import org.jetbrains.kotlin.psi.KtCallExpression

class QualifiedExpressionWithCallSelectorAccessTranslator(
    private val selector: KtCallExpression,
    private val receiver: JsExpression?,
    private val context: TranslationContext
) : AccessTranslator {

    override fun translateAsGet(): JsExpression {
        return QualifiedExpressionTranslator.invokeCallExpressionTranslator(receiver, selector, context) as JsExpression
    }

    override fun translateAsSet(setTo: JsExpression): JsExpression {
        throw IllegalStateException("Set access is not supported for " + this::class.java.simpleName)
    }

    override fun getCached(): AccessTranslator {
        throw IllegalStateException("Cashed access is not supported for " + this::class.java.simpleName)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy