diff --git a/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt index b5c73af7d9d..34528582e63 100644 --- a/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt +++ b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt @@ -34,9 +34,9 @@ import org.jetbrains.kotlin.lexer.KtTokens.CLOSING_QUOTE import org.jetbrains.kotlin.lexer.KtTokens.OPEN_QUOTE import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.parsing.* import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtUnaryExpression -import org.jetbrains.kotlin.resolve.constants.evaluate.* import org.jetbrains.kotlin.util.OperatorNameConventions //T can be either PsiElement, or LighterASTNode diff --git a/compiler/fir/tree/build.gradle.kts b/compiler/fir/tree/build.gradle.kts index 43aa2ee46dc..2f6f6a580ba 100644 --- a/compiler/fir/tree/build.gradle.kts +++ b/compiler/fir/tree/build.gradle.kts @@ -6,6 +6,7 @@ plugins { } dependencies { + compile(project(":compiler:psi")) compile(project(":compiler:frontend.common")) compile(project(":core:descriptors")) compile(project(":compiler:fir:cones")) diff --git a/compiler/fir/tree/tree-generator/build.gradle.kts b/compiler/fir/tree/tree-generator/build.gradle.kts index d6e7951e303..85fa8d4545c 100644 --- a/compiler/fir/tree/tree-generator/build.gradle.kts +++ b/compiler/fir/tree/tree-generator/build.gradle.kts @@ -11,7 +11,6 @@ val compileOnly by configurations runtimeOnly.extendsFrom(compileOnly) dependencies { - compile(project(":compiler:psi")) compile(project(":compiler:frontend.common")) compile(project(":core:descriptors")) compile(project(":compiler:fir:cones")) diff --git a/compiler/frontend.common/build.gradle.kts b/compiler/frontend.common/build.gradle.kts index e32e1755f79..d8cf6952bd5 100644 --- a/compiler/frontend.common/build.gradle.kts +++ b/compiler/frontend.common/build.gradle.kts @@ -4,15 +4,12 @@ plugins { } dependencies { - compile(project(":compiler:psi")) + compile(project(":compiler:config")) compile(project(":compiler:container")) compileOnly(intellijCoreDep()) { includeJars("intellij-core") } } - sourceSets { - "main" { - projectDefault() - } + "main" { projectDefault() } "test" {} -} \ No newline at end of file +} diff --git a/compiler/psi/src/org/jetbrains/kotlin/resolve/ImportPath.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/ImportPath.kt similarity index 65% rename from compiler/psi/src/org/jetbrains/kotlin/resolve/ImportPath.kt rename to compiler/frontend.common/src/org/jetbrains/kotlin/resolve/ImportPath.kt index 47964e6d312..f76b4e836c5 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/resolve/ImportPath.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/ImportPath.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 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.resolve diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/ConstantExpressionEvaluator.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/ConstantExpressionEvaluator.kt index 4bdbb853ee7..e8f3a9a4942 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/ConstantExpressionEvaluator.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/constants/evaluate/ConstantExpressionEvaluator.kt @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.diagnostics.reportDiagnosticOnce import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.parsing.* import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType import org.jetbrains.kotlin.resolve.* diff --git a/compiler/psi/build.gradle.kts b/compiler/psi/build.gradle.kts index 655ddf99d5b..8aa44977ff9 100644 --- a/compiler/psi/build.gradle.kts +++ b/compiler/psi/build.gradle.kts @@ -1,9 +1,3 @@ -/* - * Copyright 2000-2018 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. - */ - - plugins { kotlin("jvm") id("jps-compatible") @@ -21,6 +15,7 @@ dependencies { compile(project(":core:descriptors")) compile(project(":compiler:util")) + compile(project(":compiler:frontend.common")) compile(project(":kotlin-script-runtime")) compileOnly(intellijCoreDep()) { includeJars("intellij-core") } @@ -45,4 +40,3 @@ tasks.findByName("lexer")!!.apply { ant.properties["flex.classpath"] = jflexPath.asPath } } - diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/constants/evaluate/ParseUtils.kt b/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt similarity index 95% rename from compiler/frontend.common/src/org/jetbrains/kotlin/resolve/constants/evaluate/ParseUtils.kt rename to compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt index a395524a829..f3d716de258 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/constants/evaluate/ParseUtils.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * 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.resolve.constants.evaluate +package org.jetbrains.kotlin.parsing import com.intellij.psi.tree.IElementType import com.intellij.util.text.LiteralFormatUtil