Initial setup for the parser.

This commit is contained in:
Tom Alexander
2022-07-15 23:26:49 -04:00
commit ee9e6297a6
13 changed files with 350 additions and 0 deletions

14
src/main.rs Normal file
View File

@@ -0,0 +1,14 @@
use nom::multi::many1;
use crate::parser::paragraph;
mod parser;
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));
Ok(())
}