chem_parse/lib.rs
1#![feature(box_patterns)]
2
3pub mod ast_types;
4pub mod lexer;
5pub mod parser;
6pub mod token_types;
7
8use self::{ast_types::Node, lexer::LazyTokenStream};
9
10/// Parse a string and return a result with either the node or the error
11pub fn parse(string: String) -> Result<Box<Node>, String> {
12 let stream = LazyTokenStream::new(&string);
13 parser::parse(stream)
14}