aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-08-22 19:09:08 +0200
committerTeddy Wing2018-08-22 19:09:08 +0200
commit6624aea48840df2714b968d8a6d40579eaf41b86 (patch)
tree795d1918b89b713dba53038ddbb90f3571453f0d /src/lib.rs
parent5f670cf87ac217930babb0b8ef0f953fd2ee3447 (diff)
downloaddome-key-map-6624aea48840df2714b968d8a6d40579eaf41b86.tar.bz2
Add `MapGroup::parse()`; Start Cocoa function
Add a new `cocoa` module which will hold code to be called from Objective-C. Currently contains a sketch of a function that will be called via FFI from Objective-C. Haven't thought of a name for it yet. For now contains a sample map definition "file" in a hard-coded string. Tells `MapGroup` to parse the map definitions. Will try to create some Cocoa objects in the `unsafe` block. `MapGroup`: Add `parse()` method. Given a map definition string, this new function will parse the string into a `MapGroup` and return the result. It will serve as the entry point to parsing DomeKey map definitions. Thanks to these references for Combine parser error handling: - https://github.com/ordian/toml_edit/blob/b02bc3/src/parser/document.rs - https://github.com/ordian/toml_edit/blob/ee6895f/src/parser/errors.rs - https://github.com/Marwes/combine/blob/54bcfed/examples/ini.rs
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index cf634d2..8e9a592 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,7 @@
#[macro_use]
extern crate combine;
+mod cocoa;
mod parser;
+
+use parser::MapGroup;