clippy fix
This commit is contained in:
parent
c2628102cc
commit
b8c7d501f6
|
@ -140,7 +140,7 @@ pub fn lower_module(pa_module: parser::Module) -> Result<String, CompileError> {
|
|||
parser::ModuleItem::Assign(assignment) => {
|
||||
lower_assignment(&context, &mut ir_module, assignment)?
|
||||
}
|
||||
parser::ModuleItem::Proc(proc) => todo!("lowering process"),
|
||||
parser::ModuleItem::Proc(_proc) => todo!("lowering process"),
|
||||
}
|
||||
}
|
||||
ir_module.write_rtlil(&mut writer);
|
||||
|
|
|
@ -4,7 +4,7 @@ mod literals;
|
|||
mod parser;
|
||||
mod rtlil;
|
||||
|
||||
use nom::error::convert_error;
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -5,9 +5,9 @@ use nom::{
|
|||
branch::alt,
|
||||
bytes::complete::tag,
|
||||
character::complete::{alpha1, alphanumeric1, char, multispace0, multispace1, u64 as decimal},
|
||||
combinator::{consumed, map, opt, recognize},
|
||||
combinator::{map, opt, recognize},
|
||||
error::{context, ParseError, VerboseError},
|
||||
multi::{many0, many1, separated_list0},
|
||||
multi::{many0, separated_list0},
|
||||
sequence::{delimited, pair, preceded, separated_pair, terminated, tuple},
|
||||
};
|
||||
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
use nom::{
|
||||
branch::alt,
|
||||
bytes::complete::tag,
|
||||
character::complete::{alpha1, alphanumeric1, char, multispace0, multispace1, u64 as decimal},
|
||||
combinator::{consumed, map, opt, recognize},
|
||||
error::{context, ParseError, VerboseError},
|
||||
multi::{many0, many1, separated_list0},
|
||||
sequence::{delimited, pair, preceded, separated_pair, terminated, tuple},
|
||||
character::complete::char,
|
||||
combinator::{consumed, map},
|
||||
error::context,
|
||||
multi::{many1, separated_list0},
|
||||
sequence::{delimited, tuple},
|
||||
};
|
||||
|
||||
use crate::parser::proc::{proc_block, ProcBlock};
|
||||
use crate::parser::{
|
||||
assign_statement, declaration, identifier, intliteral, widthspec, ws0, Assign, IResult,
|
||||
NetDecl, Span,
|
||||
assign_statement, declaration, identifier, ws0, Assign, IResult,
|
||||
NetDecl, Span, proc::{proc_block, ProcBlock},
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -63,8 +62,8 @@ fn ports_list(input: Span) -> IResult<Span, Vec<PortDecl>> {
|
|||
|
||||
fn module_item(input: Span) -> IResult<Span, ModuleItem> {
|
||||
alt((
|
||||
map(assign_statement, |assig| ModuleItem::Assign(assig)),
|
||||
map(proc_block, |proc| ModuleItem::Proc(proc)),
|
||||
map(assign_statement, ModuleItem::Assign),
|
||||
map(proc_block, ModuleItem::Proc),
|
||||
))(input)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
use nom::{
|
||||
branch::alt,
|
||||
bytes::complete::tag,
|
||||
character::complete::{alpha1, alphanumeric1, char, multispace0, multispace1, u64 as decimal},
|
||||
combinator::{consumed, map, opt, recognize},
|
||||
error::{context, ParseError, VerboseError},
|
||||
multi::{many0, many1, separated_list0},
|
||||
sequence::{delimited, pair, preceded, separated_pair, terminated, tuple},
|
||||
character::complete::char,
|
||||
combinator::map,
|
||||
error::context,
|
||||
multi::many0,
|
||||
sequence::{delimited, tuple},
|
||||
};
|
||||
|
||||
use crate::parser::{identifier, ws0, Expression, IResult, Span};
|
||||
|
|
Loading…
Reference in New Issue