summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-29 11:32:27 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-05-02 20:42:56 +0200
commitd51832240128d5c3c21f94e3049de84bfa758224 (patch)
tree856eace1c4186a2f297786de798bc42d2f305a40 /bin
parent74c982984c00069ca35426d42d722c940766450c (diff)
Add notes how the filter language should look like
Diffstat (limited to 'bin')
-rw-r--r--bin/core/imag-ids/src/id_filters.rs46
1 files changed, 46 insertions, 0 deletions
diff --git a/bin/core/imag-ids/src/id_filters.rs b/bin/core/imag-ids/src/id_filters.rs
index 966d7589..53c12462 100644
--- a/bin/core/imag-ids/src/id_filters.rs
+++ b/bin/core/imag-ids/src/id_filters.rs
@@ -43,3 +43,49 @@ impl<'a, A> Filter<StoreId> for IsInCollectionsFilter<'a, A>
}
}
+/// Language definition for the header-filter language
+///
+/// # Notes
+///
+/// Here are some notes how the language should look like:
+///
+/// ```ignore
+/// query = filter (operator filter)*
+///
+/// filter = unary? ((function "(" selector ")" ) | selector ) compare_op compare_val
+///
+/// unary = "not"
+///
+/// compare_op =
+/// "is" |
+/// "in" |
+/// "==/eq" |
+/// "!=/neq" |
+/// ">=" |
+/// "<=" |
+/// "<" |
+/// ">" |
+/// "any" |
+/// "all"
+///
+/// compare_val = val | listofval
+///
+/// val = string | int | float | bool
+/// listofval = "[" (val ",")* "]"
+///
+/// operator =
+/// "or" |
+/// "or_not" |
+/// "and" |
+/// "and_not" |
+/// "xor"
+///
+/// function =
+/// "length" |
+/// "keys" |
+/// "values"
+/// ```
+///
+mod header_filter_lang {
+}
+