Expose a document parser and implement the paragraph parser so something is hitting our macro.

This commit is contained in:
Tom Alexander
2022-07-16 18:26:53 -04:00
parent 040671b98f
commit fdd5b532fc
4 changed files with 14 additions and 8 deletions

View File

@@ -1,6 +1,4 @@
use nom::multi::many1;
use crate::parser::paragraph;
use crate::parser::document;
mod parser;
@@ -9,6 +7,6 @@ const TEST_DOC: &'static str = include_str!("../toy_language.txt");
fn main() -> Result<(), Box<dyn std::error::Error>> {
pretty_env_logger::init();
println!("{}\n\n\n", TEST_DOC);
println!("{:#?}", many1(paragraph)(TEST_DOC));
println!("{:#?}", document(TEST_DOC));
Ok(())
}