|
|
@ -445,7 +445,13 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { |
|
|
|
var tmp: String |
|
|
|
var tmp: String |
|
|
|
val evalMatcher = evalPattern.matcher(rule) |
|
|
|
val evalMatcher = evalPattern.matcher(rule) |
|
|
|
|
|
|
|
|
|
|
|
while (evalMatcher.find()) { |
|
|
|
if (evalMatcher.find()) { |
|
|
|
|
|
|
|
if (mode != Mode.Js && mode != Mode.Regex |
|
|
|
|
|
|
|
&& evalMatcher.start() == 0 |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
do { |
|
|
|
if (evalMatcher.start() > start) { |
|
|
|
if (evalMatcher.start() > start) { |
|
|
|
tmp = rule.substring(start, evalMatcher.start()) |
|
|
|
tmp = rule.substring(start, evalMatcher.start()) |
|
|
|
if (mode != Mode.Js && mode != Mode.Regex |
|
|
|
if (mode != Mode.Js && mode != Mode.Regex |
|
|
@ -454,10 +460,6 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { |
|
|
|
mode = Mode.Regex |
|
|
|
mode = Mode.Regex |
|
|
|
} |
|
|
|
} |
|
|
|
splitRegex(tmp) |
|
|
|
splitRegex(tmp) |
|
|
|
} else if (mode != Mode.Js && mode != Mode.Regex |
|
|
|
|
|
|
|
&& evalMatcher.start() == 0 |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
mode = Mode.Regex |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
tmp = evalMatcher.group() |
|
|
|
tmp = evalMatcher.group() |
|
|
|
when { |
|
|
|
when { |
|
|
@ -474,6 +476,7 @@ class AnalyzeRule(val ruleData: RuleDataInterface) : JsExtensions { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
start = evalMatcher.end() |
|
|
|
start = evalMatcher.end() |
|
|
|
|
|
|
|
} while (evalMatcher.find()) |
|
|
|
} |
|
|
|
} |
|
|
|
if (rule.length > start) { |
|
|
|
if (rule.length > start) { |
|
|
|
tmp = rule.substring(start) |
|
|
|
tmp = rule.substring(start) |
|
|
|