FIR LT: Introduce source file abstraction, carry it from parsing to IR

along with source lines mapping, allows to "emulate" usage of the
PSI files which allows to extract source file and line mapping info
on every stage from source element.
It makes sense to use this mapping for the error reporting too.
This commit is contained in:
Ilya Chernikov
2022-02-19 21:07:21 +01:00
committed by teamcity
parent bd60d4b2a6
commit 03cbfea737
45 changed files with 539 additions and 239 deletions
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.codegen.inline.GENERATE_SMAP
import org.jetbrains.kotlin.test.KotlinBaseTest
import org.jetbrains.kotlin.test.util.JUnit4Assertions
import org.junit.Assert
import java.io.File
import java.io.StringReader
object SMAPTestUtil {
@@ -62,7 +63,7 @@ object SMAPTestUtil {
}.associateBy { it.sourceFile }
for (source in sourceData) {
val ktFileName = "/" + source.sourceFile
val ktFileName = "/" + File(source.sourceFile).name
.replace(".smap-nonseparate-compilation", ".kt")
.replace(".smap-separate-compilation", ".kt")
.replace(".smap", ".kt")