Dev #194

Merged
altavir merged 266 commits from dev into master 2021-01-20 17:32:32 +03:00
Showing only changes of commit d521fa0d8d - Show all commits

View File

@ -42,7 +42,7 @@ internal class ESTreeBuilder<T>(val bodyCallback: ESTreeBuilder<T>.() -> BaseExp
value == null || jsTypeOf(value) == "number" || jsTypeOf(value) == "string" || jsTypeOf(value) == "boolean" ->
SimpleLiteral(value)
jsType(value) == "undefined" -> Identifier("undefined")
jsTypeOf(value) == "undefined" -> Identifier("undefined")
else -> {
val idx = if (value in constants) constants.indexOf(value) else constants.also { it += value }.lastIndex