https://github.com/kituin/modmultiversioninterpreter
ModMultiVersion自定义词法分析器,语法分析器,解释执行器
https://github.com/kituin/modmultiversioninterpreter
Last synced: 3 months ago
JSON representation
ModMultiVersion自定义词法分析器,语法分析器,解释执行器
- Host: GitHub
- URL: https://github.com/kituin/modmultiversioninterpreter
- Owner: kitUIN
- License: mit
- Created: 2024-07-17T18:46:57.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-16T07:43:14.000Z (5 months ago)
- Last Synced: 2025-02-16T08:19:16.410Z (5 months ago)
- Language: Kotlin
- Size: 105 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![]()
# ModMultiVersionInterpreter
✨ 多版本代码同步-解析器 ✨
## 实现功能
- `(` `)`
- `!` `&&` `||`
- `!=` `>` `>=` `<` `<=` `==`
- `&`识别为`&&`
- `|`识别为`||`
- `=`识别为`==` (定义模式中不生效)
- 左部省略自动补充`$$ ==`
- `$$`自动替换为具体内容
- 支持使用其他 关键字用于自动替换
- 支持`*-1.20.1`通配符识别加载器## 使用
```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
```## 相关项目
- [ModMultiVersion](https://github.com/kitUIN/ModMultiVersion) Idea插件-Minecraft模组多版本代码同步
- [ModMultiVersionTool](https://github.com/kitUIN/ModMultiVersionTool) ModMultiVersion-构建工具
- [ModMultiVersionInterpreter](https://github.com/kitUIN/ModMultiVersionInterpreter) ModMultiVersion自定义词法分析器,语法分析器,解释执行器