1#![allow(dead_code)]
2pub mod ast;
3pub mod errors;
4pub mod objects;
5mod parser;
6pub mod position;
7mod scanner;
8pub mod scope;
9pub mod token;
10pub mod visitor;
11
12pub use ast::Expr;
13pub use parser::Parser;
14pub use position::{FileSet, Pos, Position};
15pub use token::Token;
16
17pub fn parse_file<'a>(
18 o: &'a mut objects::Objects,
19 fs: &'a mut position::FileSet,
20 el: &'a errors::ErrorList,
21 name: &str,
22 src: &'a str,
23 trace: bool,
24) -> (parser::Parser<'a>, Option<ast::File>) {
25 let f = fs.add_file(name.to_string(), None, src.chars().count());
26 let mut p = parser::Parser::new(o, f, el, src, trace);
27 let file = p.parse_file();
28 (p, file)
29}