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:
@@ -285,7 +285,7 @@ fun IrFile.getKtFile(): KtFile? =
|
||||
fun IrFile.getIoFile(): File? =
|
||||
when (val fe = fileEntry) {
|
||||
is PsiIrFileEntry -> fe.psiFile.virtualFile?.path?.let(::File)
|
||||
else -> File(fe.name).takeIf { it.exists() }
|
||||
else -> File(fe.name)
|
||||
}
|
||||
|
||||
inline fun IrElement.hasChild(crossinline block: (IrElement) -> Boolean): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user