JS: incremental translation of tests and main fun invocation

This commit is contained in:
Anton Bannykh
2018-11-13 21:07:38 +03:00
parent 0397af79b4
commit 3529114913
12 changed files with 1134 additions and 86 deletions
@@ -6,13 +6,15 @@ package org.jetbrains.kotlin.js.backend.ast
import java.util.*
class JsProgramFragment(val scope: JsScope) {
val importedModules: MutableList<JsImportedModule> = ArrayList()
class JsProgramFragment(val scope: JsScope, val packageFqn: String) {
val importedModules = mutableListOf<JsImportedModule>()
val imports: MutableMap<String, JsExpression> = LinkedHashMap()
val declarationBlock = JsGlobalBlock()
val exportBlock = JsGlobalBlock()
val initializerBlock = JsGlobalBlock()
val nameBindings: MutableList<JsNameBinding> = ArrayList()
val nameBindings = mutableListOf<JsNameBinding>()
val classes: MutableMap<JsName, JsClassModel> = LinkedHashMap()
val inlineModuleMap: MutableMap<String, JsExpression> = LinkedHashMap()
var tests: JsStatement? = null
var mainFunction: JsStatement? = null
}