Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kituin/modmultiversioninterpreter

ModMultiVersion自定义词法分析器,语法分析器,解释执行器
https://github.com/kituin/modmultiversioninterpreter

Last synced: 19 days ago
JSON representation

ModMultiVersion自定义词法分析器,语法分析器,解释执行器

Awesome Lists containing this project

README

        


ModMultiVersionInterpreter


# ModMultiVersionInterpreter

✨ 多版本代码同步-解析器 ✨




license


release

## 实现功能
- `(` `)`
- `!` `&&` `||`
- `!=` `>` `>=` `<` `<=` `==`
- `&`识别为`&&`
- `|`识别为`||`
- `=`识别为`==` (定义模式中不生效)
- 左部省略自动补充`$$ ==`
- `$$`自动替换为具体内容
- 支持使用其他 关键字用于自动替换

## 使用
```kotlin
repositories {
mavenCentral()
maven {
name = "kituinMavenReleases"
url = uri("https://maven.kituin.fun/releases")
}
}

dependencies {
implementation("io.github.kituin:ModMultiVersionInterpreter:$interpreter_version")
}
```

## 布尔模式
```kotlin
val interpreter = Interpreter(">=fabric-1.20", mutableMapOf(
"$$" to "fabric-1.20.3"
))
println(interpreter.interpret()) // true
```