mirror of https://codeberg.org/topola/topola.git
specctra: some DSN files use 'PCB' instead of 'pcb'
This commit is contained in:
parent
f414089521
commit
c7a18dd4cc
|
|
@ -44,11 +44,23 @@ pub struct NetOut {
|
||||||
pub via: Vec<Via>,
|
pub via: Vec<Via>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(ReadDsn, WriteSes, Debug)]
|
#[derive(WriteSes, Debug)]
|
||||||
pub struct DsnFile {
|
pub struct DsnFile {
|
||||||
pub pcb: Pcb,
|
pub pcb: Pcb,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<R: std::io::BufRead> ReadDsn<R> for DsnFile {
|
||||||
|
fn read_dsn(tokenizer: &mut ListTokenizer<R>) -> Result<Self, ParseError> {
|
||||||
|
let mut pcb_type_name = tokenizer.consume_token()?.expect_any_start()?;
|
||||||
|
if !pcb_type_name.eq_ignore_ascii_case("pcb") {
|
||||||
|
return Err(ParseError::ExpectedStartOfList("pcb"));
|
||||||
|
}
|
||||||
|
let pcb = tokenizer.read_value::<Pcb>()?;
|
||||||
|
tokenizer.consume_token()?.expect_end()?;
|
||||||
|
Ok(Self { pcb })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(ReadDsn, WriteSes, Debug)]
|
#[derive(ReadDsn, WriteSes, Debug)]
|
||||||
pub struct Pcb {
|
pub struct Pcb {
|
||||||
#[anon]
|
#[anon]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue