Start update to 1.13

This commit is contained in:
Jonas Herzig
2018-12-19 09:44:21 +01:00
parent 65295b311e
commit 9655677972
37 changed files with 793 additions and 245 deletions

View File

@@ -9,6 +9,17 @@ static def evalVar(vars, String var) {
import java.util.regex.Pattern
static def evalExpr(vars, String expr) {
expr = expr.trim()
def parts = expr.split(/\|\|/)
if (parts.length > 1) {
return parts.any { evalExpr(vars, it) }
}
parts = expr.split(/&&/)
if (parts.length > 1) {
return !parts.any { !evalExpr(vars, it) }
}
def matcher = Pattern.compile(/(.+)(<=|>=|<|>)(.+)/).matcher(expr)
if (matcher.matches()) {
def lhs = evalVar(vars, matcher.group(1))