Blank function definitions (unimplemented) for the markdown link parser using nom

This commit is contained in:
Mathieu David 2016-06-29 01:01:29 +02:00
parent 5350d62591
commit fb648ef61e
3 changed files with 33 additions and 0 deletions

View File

@ -19,6 +19,7 @@ clap = "2.2.1"
handlebars = "0.20.0"
rustc-serialize = "0.3.18"
pulldown-cmark = "0.0.8"
nom = "1.2.3"
# Watch feature
notify = { version = "2.5.5", optional = true }

View File

@ -1,3 +1,4 @@
pub use self::summary::construct_bookitems;
pub mod summary;
pub mod nom;

31
src/parse/nom.rs Normal file
View File

@ -0,0 +1,31 @@
extern crate nom;
use self::nom::IResult;
#[derive(Debug, Clone)]
struct Link {
title: String,
destination: String,
}
/// Parser for markdown links: `[title](destination)`
/// From the Common Mark spec:
///
/// Brackets are allowed in the link text only if
/// (a) they are backslash-escaped or
/// (b) they appear as a matched pair of brackets,
/// with an open bracket [, a sequence of zero or more inlines, and a close bracket ].
///
fn link(i: &[u8]) -> IResult<&[u8], Link> {
unimplemented!();
}
/// Parser for parsing the title part of the link: [title](destination)
/// ^^^^^^^
fn link_text(i: &[u8]) -> IResult<&[u8], String> {
unimplemented!();
}
fn link_destination(i: &[u8]) -> IResult<&[u8], String> {
unimplemented!();
}