aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2018-08-08 05:30:21 +0200
committerTeddy Wing2018-08-08 05:30:21 +0200
commit20ed9e16aeda341d172fbbaa4fc17e4364119445 (patch)
tree02cbf439c2155c11763995c25ca31f480df2a615 /src
parentbf859c8d4380f5ba364316eb0bb31e807d1c8522 (diff)
downloaddome-key-map-20ed9e16aeda341d172fbbaa4fc17e4364119445.tar.bz2
Add some types to use for storing the parsed result
Imagining how the data should be stored after parsing the map file.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 31e1bb2..14db49b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,21 @@
+extern crate combine;
+
+use std::collections::HashMap;
+
+type Trigger = String;
+type Action = String;
+
+pub struct Map {
+ pub trigger: Trigger,
+ pub action: Action,
+ pub kind: String,
+}
+
+pub struct DKMapGroup {
+ maps: HashMap<Trigger, Action>,
+ modes: HashMap<Trigger, Map>,
+}
+
#[cfg(test)]
mod tests {
#[test]