summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
authorNadrieril Feneanar2019-12-22 00:48:35 +0000
committerGitHub2019-12-22 00:48:35 +0000
commit06e75c919d999c310f8ca1c151c6a5ad6918ca08 (patch)
tree849a54821e08c78cbff4965e1a268e050466fa6c /dhall/src
parentce74f996808ae84b4967040f3441e1bbba31f506 (diff)
parent139daf4da23c87366d920cea2775afe11cce7be7 (diff)
Merge pull request #122 from Nadrieril/publish
Publish to crates.io
Diffstat (limited to 'dhall/src')
-rw-r--r--dhall/src/lib.rs1
-rw-r--r--dhall/src/syntax/text/parser.rs12
2 files changed, 10 insertions, 3 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index 12660b4..dfa06e7 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -1,3 +1,4 @@
+#![doc(html_root_url = "https://docs.rs/dhall/0.1.1")]
#![feature(trace_macros)]
#![feature(slice_patterns)]
#![feature(never_type)]
diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs
index 90cb4b1..832472b 100644
--- a/dhall/src/syntax/text/parser.rs
+++ b/dhall/src/syntax/text/parser.rs
@@ -156,9 +156,15 @@ lazy_static::lazy_static! {
};
}
-#[derive(Parser)]
-#[grammar = "dhall.pest"]
-struct DhallParser;
+// Generate pest parser manually becaue otherwise we'd need to modify something outside of OUT_DIR
+// and that's forbidden by docs.rs.
+// This is equivalent to:
+// ```
+// #[derive(Parser)
+// #[grammar = "..."]
+// struct DhallParser;
+// ```
+include!(concat!(env!("OUT_DIR"), "/dhall_parser.rs"));
#[pest_consume::parser(parser = DhallParser, rule = Rule)]
impl DhallParser {