rule.rsを分割する (#121)

* Refact: split code for matcher from rule.rs

* Reafact: combine multiple declared functions

* Refact: split code for SelectionNode from rule.rs

* Refact: mv test code for SelectionNode from rule.rs

* Refact: mv condition's code from rule.rs

* Refact: mv aggregation's code from condition_parser.rs

* Refact: use relationships

* cargo fmt --all

* remove unnecessary matcher

Co-authored-by: HajimeTakai <takai.wa.hajime@gmail.com>
This commit is contained in:
itiB
2021-07-08 01:41:59 +09:00
committed by GitHub
parent c13e6da932
commit 65b714b81b
7 changed files with 4832 additions and 4780 deletions

View File

@@ -14,6 +14,15 @@ use std::io::prelude::*;
use std::str;
use std::string::String;
pub fn concat_selection_key(key_list: &Vec<String>) -> String {
return key_list
.iter()
.fold("detection -> selection".to_string(), |mut acc, cur| {
acc = acc + " -> " + cur;
return acc;
});
}
pub fn check_regex(
string: &str,
r#type: usize,