get rid of unused braces

This commit is contained in:
Michael Zhang 2021-02-03 01:57:55 -06:00
parent 6353d4f239
commit 02011dfe44
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 11 additions and 7 deletions

View file

@ -1,7 +1,7 @@
mod ast; pub mod ast;
mod name_res; pub mod name_res;
mod parser; pub mod parser;
mod utils; pub mod utils;
use std::fs::{File, OpenOptions}; use std::fs::{File, OpenOptions};
use std::io::{Read, Write}; use std::io::{Read, Write};
@ -35,7 +35,7 @@ fn main() -> Result<()> {
let namespaces = Namespaces::create(parsed); let namespaces = Namespaces::create(parsed);
println!("namespaces: {:?}", namespaces); println!("namespaces: {:?}", namespaces);
namespaces.name_resolution(); let tree = namespaces.name_resolution();
let isa = { let isa = {
use std::str::FromStr; use std::str::FromStr;

View file

@ -1,9 +1,13 @@
use anyhow::Result; use anyhow::Result;
use lalrpop_util::lalrpop_mod;
use crate::ast::Program; use crate::ast::Program;
mod parser {
#![allow(unused_braces)]
use lalrpop_util::lalrpop_mod;
lalrpop_mod!(parser); lalrpop_mod!(parser);
pub use self::parser::*;
}
pub fn parse(s: impl AsRef<str>) -> Result<Program> { pub fn parse(s: impl AsRef<str>) -> Result<Program> {
let s = s.as_ref().to_owned(); let s = s.as_ref().to_owned();