JS: optimize JSON parser

This commit is contained in:
Anton Bannykh
2019-04-12 13:00:19 +03:00
parent 675f930566
commit 56915d1c07
8 changed files with 52 additions and 35 deletions
@@ -89,8 +89,7 @@ class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit
return@map block
}
val sourceMapParse = file.sourceMapResource
?.let { InputStreamReader(it.reader(), "UTF-8") }
?.use { SourceMapParser.parse(it) }
?.let { SourceMapParser.parse(InputStreamReader(it.reader(), "UTF-8").readText()) }
when (sourceMapParse) {
is SourceMapError -> {
logConsumer(