Add source information to parsed JS AST

This commit is contained in:
Alexey Andreev
2017-05-17 15:06:01 +03:00
parent 1d1da326be
commit 93ec81d2eb
4 changed files with 14 additions and 13 deletions
@@ -96,7 +96,7 @@ abstract class BasicOptimizerTest(private var basePath: String) {
}
override fun visitIf(x: JsIf) {
val line = x.getData<Int?>("line")
val line = (x.source as? JsLocation)?.startLine
if (line != null && line in comments.indices && comments[line]) {
x.synthetic = true
}