[JS] Add a doc comment for SourceMapLocationRemapper
This commit is contained in:
+6
-1
@@ -18,6 +18,11 @@ package org.jetbrains.kotlin.js.parser.sourcemaps
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.js.backend.ast.*
|
import org.jetbrains.kotlin.js.backend.ast.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JS source map remapper takes parsed source maps
|
||||||
|
* together with JS AST with correct JS positioning information
|
||||||
|
* and converts the latter into Kotlin positioning information
|
||||||
|
*/
|
||||||
class SourceMapLocationRemapper(private val sourceMap: SourceMap, private val sourceMapPathMapper: (String) -> String = { it }) {
|
class SourceMapLocationRemapper(private val sourceMap: SourceMap, private val sourceMapPathMapper: (String) -> String = { it }) {
|
||||||
fun remap(node: JsNode) {
|
fun remap(node: JsNode) {
|
||||||
val listCollector = JsNodeFlatListCollector()
|
val listCollector = JsNodeFlatListCollector()
|
||||||
@@ -138,4 +143,4 @@ class SourceMapLocationRemapper(private val sourceMap: SourceMap, private val so
|
|||||||
return first.startLine > second.startLine || (first.startLine == second.startLine && first.startChar >= second.startChar)
|
return first.startLine > second.startLine || (first.startLine == second.startLine && first.startChar >= second.startChar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user