diff --git a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/Codegen.kt b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/estree.kt similarity index 92% rename from kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/Codegen.kt rename to kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/estree.kt index f5727fb16..5036e96c0 100644 --- a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/Codegen.kt +++ b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/estree.kt @@ -2,7 +2,7 @@ package kscience.kmath.estree import kscience.kmath.ast.MST import kscience.kmath.ast.MstExpression -import kscience.kmath.estree.internal.JSBuilder +import kscience.kmath.estree.internal.ESTreeBuilder import kscience.kmath.estree.internal.estree.BaseExpression import kscience.kmath.expressions.Expression import kscience.kmath.operations.Algebra @@ -11,7 +11,7 @@ import kscience.kmath.operations.RealField @PublishedApi internal fun MST.compileWith(algebra: Algebra): Expression { - fun JSBuilder.visit(node: MST): BaseExpression = when (node) { + fun ESTreeBuilder.visit(node: MST): BaseExpression = when (node) { is MST.Symbolic -> { val symbol = try { algebra.symbol(node.value) @@ -57,7 +57,7 @@ internal fun MST.compileWith(algebra: Algebra): Expression { } } - return JSBuilder { visit(this@compileWith) }.instance + return ESTreeBuilder { visit(this@compileWith) }.instance } diff --git a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt similarity index 96% rename from kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt rename to kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt index 6845437b3..e58ad54b3 100644 --- a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/JSBuilder.kt +++ b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt @@ -5,7 +5,7 @@ import kscience.kmath.estree.internal.estree.* import kscience.kmath.expressions.Expression import kscience.kmath.expressions.Symbol -internal class JSBuilder(val bodyCallback: JSBuilder.() -> BaseExpression) { +internal class ESTreeBuilder(val bodyCallback: ESTreeBuilder.() -> BaseExpression) { private class GeneratedExpression(val executable: dynamic, val constants: Array) : Expression { @Suppress("UNUSED_VARIABLE") override fun invoke(arguments: Map): T {