JS: use temporary names while translation, replace with fixed name during post-processing pass

This commit is contained in:
Alexey Andreev
2016-11-23 16:02:42 +03:00
parent 9c78301008
commit e54138b74f
39 changed files with 362 additions and 194 deletions
@@ -87,10 +87,10 @@ class JsCallChecker(
val errorReporter = JsCodeErrorReporter(argument, code, context.trace)
try {
val parserScope = JsFunctionScope(JsRootScope(JsProgram("<js checker>")), "<js fun>")
val parserScope = JsFunctionScope(JsRootScope(JsProgram()), "<js fun>")
val statements = parse(code, errorReporter, parserScope)
if (statements.size == 0) {
if (statements.isEmpty()) {
context.trace.report(ErrorsJs.JSCODE_NO_JAVASCRIPT_PRODUCED.on(argument))
}
} catch (e: AbortParsingException) {