diff --git a/src/main.rs b/src/main.rs index 4056392..5818467 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ -mod ast; -mod name_res; -mod parser; -mod utils; +pub mod ast; +pub mod name_res; +pub mod parser; +pub mod utils; use std::fs::{File, OpenOptions}; use std::io::{Read, Write}; @@ -35,7 +35,7 @@ fn main() -> Result<()> { let namespaces = Namespaces::create(parsed); println!("namespaces: {:?}", namespaces); - namespaces.name_resolution(); + let tree = namespaces.name_resolution(); let isa = { use std::str::FromStr; diff --git a/src/parser.rs b/src/parser.rs index 672cd6f..a68472f 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,9 +1,13 @@ use anyhow::Result; -use lalrpop_util::lalrpop_mod; use crate::ast::Program; -lalrpop_mod!(parser); +mod parser { + #![allow(unused_braces)] + use lalrpop_util::lalrpop_mod; + lalrpop_mod!(parser); + pub use self::parser::*; +} pub fn parse(s: impl AsRef) -> Result { let s = s.as_ref().to_owned();