diff --git a/kmath-ast/build.gradle.kts b/kmath-ast/build.gradle.kts index 3f309b67c..f2080d0b2 100644 --- a/kmath-ast/build.gradle.kts +++ b/kmath-ast/build.gradle.kts @@ -27,6 +27,7 @@ kotlin.js { kotlin.sourceSets { commonMain { dependencies { + api("com.github.h0tk3y.betterParse:better-parse:0.4.2") api(project(":kmath-core")) } } @@ -39,13 +40,12 @@ kotlin.sourceSets { jsMain { dependencies { - implementation(npm("astring", "1.7.0")) + implementation(npm("astring", "1.7.4")) } } jvmMain { dependencies { - api("com.github.h0tk3y.betterParse:better-parse:0.4.1") implementation("org.ow2.asm:asm:9.1") implementation("org.ow2.asm:asm-commons:9.1") } @@ -64,25 +64,7 @@ readme { feature( id = "expression-language", description = "Expression language and its parser", - ref = "src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt" - ) - - feature( - id = "mst", - description = "MST (Mathematical Syntax Tree) as expression language's syntax intermediate representation", - ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt" - ) - - feature( - id = "mst-building", - description = "MST building algebraic structure", - ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MstAlgebra.kt" - ) - - feature( - id = "mst-interpreter", - description = "MST interpreter", - ref = "src/commonMain/kotlin/space/kscience/kmath/ast/MST.kt" + ref = "src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt" ) feature( @@ -96,4 +78,10 @@ readme { description = "Dynamic MST to JS compiler", ref = "src/jsMain/kotlin/space/kscience/kmath/estree/estree.kt" ) + + feature( + id = "rendering", + description = "Extendable MST rendering", + ref = "src/commonMain/kotlin/space/kscience/kmath/ast/rendering/MathRenderer.kt" + ) } diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt similarity index 98% rename from kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt rename to kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt index 025f4984c..d2e92c37f 100644 --- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/ast/parser.kt +++ b/kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/parser.kt @@ -3,8 +3,6 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -// TODO move to common when https://github.com/h0tk3y/better-parse/pull/37 is merged - package space.kscience.kmath.ast import com.github.h0tk3y.betterParse.combinators.*