aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr/mod.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-06-26 16:54:11 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-06-26 16:54:11 +0200
commit86e0f74bd7f0301886c1dda0f147b6c8ffbdd707 (patch)
treedb6dc6aa23b05173c33f9ea5345f7871c8ce62b4 /src/fexpr/mod.rs
parent1fb3d3259d23410f8bf9879f64de880a11e4f876 (diff)
parente22b79adaaa69761fc520d6cd57baee1025fa926 (diff)
downloadraidgrep-86e0f74bd7f0301886c1dda0f147b6c8ffbdd707.tar.gz
raidgrep-86e0f74bd7f0301886c1dda0f147b6c8ffbdd707.tar.bz2
raidgrep-86e0f74bd7f0301886c1dda0f147b6c8ffbdd707.zip
Merge branch 'comparison-filters'
Diffstat (limited to 'src/fexpr/mod.rs')
-rw-r--r--src/fexpr/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fexpr/mod.rs b/src/fexpr/mod.rs
index c6a3a39..5d12051 100644
--- a/src/fexpr/mod.rs
+++ b/src/fexpr/mod.rs
@@ -11,6 +11,12 @@ use itertools::Itertools;
use lalrpop_util::{lalrpop_mod, lexer::Token, ParseError};
use thiserror::Error;
+// Lalrpop chokes on the associated type specification (it doesn't expect the =), so we need to
+// define those aliases here in Rust and then import and use them in the grammar.
+trait DateProducer = filters::values::Producer<Output = chrono::DateTime<chrono::Utc>>;
+trait DurationProducer = filters::values::Producer<Output = chrono::Duration>;
+trait CountProducer = filters::values::Producer<Output = u8>;
+
lalrpop_mod!(#[allow(clippy::all)] pub grammar, "/fexpr/grammar.rs");
#[derive(Debug)]