Update dependencies

This commit is contained in:
Iaroslav Postovalov 2021-02-26 21:50:06 +07:00
parent 72affcf09b
commit 9f663ae7f7
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7
2 changed files with 11 additions and 9 deletions

View File

@ -33,21 +33,23 @@ kotlin.sourceSets {
jsMain {
dependencies {
implementation(npm("astring", "1.4.3"))
implementation(npm("astring", "1.7.0"))
}
}
jvmMain {
dependencies {
api("com.github.h0tk3y.betterParse:better-parse:0.4.0")
implementation("org.ow2.asm:asm:9.0")
implementation("org.ow2.asm:asm-commons:9.0")
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")
}
}
}
//Workaround for https://github.com/Kotlin/dokka/issues/1455
tasks.getByName("dokkaHtml").dependsOn(tasks.getByName("build"))
tasks.dokkaHtml {
dependsOn(tasks.build)
}
readme {
maturity = Maturity.PROTOTYPE

View File

@ -1,4 +1,4 @@
// TODO move to common when https://github.com/h0tk3y/better-parse/pull/33 is merged
// TODO move to common when https://github.com/h0tk3y/better-parse/pull/37 is merged
package space.kscience.kmath.ast
@ -25,8 +25,8 @@ import space.kscience.kmath.operations.SpaceOperations
*/
public object ArithmeticsEvaluator : Grammar<MST>() {
// TODO replace with "...".toRegex() when better-parse 0.4.1 is released
private val num: Token by regexToken("[\\d.]+(?:[eE][-+]?\\d+)?")
private val id: Token by regexToken("[a-z_A-Z][\\da-z_A-Z]*")
private val num: Token by regexToken("[\\d.]+(?:[eE][-+]?\\d+)?".toRegex())
private val id: Token by regexToken("[a-z_A-Z][\\da-z_A-Z]*".toRegex())
private val lpar: Token by literalToken("(")
private val rpar: Token by literalToken(")")
private val comma: Token by literalToken(",")
@ -35,7 +35,7 @@ public object ArithmeticsEvaluator : Grammar<MST>() {
private val div: Token by literalToken("/")
private val minus: Token by literalToken("-")
private val plus: Token by literalToken("+")
private val ws: Token by regexToken("\\s+", ignore = true)
private val ws: Token by regexToken("\\s+".toRegex(), ignore = true)
private val number: Parser<MST> by num use { MST.Numeric(text.toDouble()) }
private val singular: Parser<MST> by id use { MST.Symbolic(text) }