mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-12-22 13:25:49 +00:00
Rust library to parse SystemVerilog / Verilog filelists, used in https://github.com/dalance/svlint
https://crates.io/crates/sv-filelist-parser
src | ||
testcase | ||
tests | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
Verilog Filelist Parser
A library in Rust to parse a Verilog Filelist and return a list of files, include directories and defines
Example
use verilog_filelist_parser;
let filelist = verilog_filelist_parser::parse_file("testcase/files.f")
.expect("Cannot read filelist");
for file in filelist.files {
println!("{:?}", file);
}
for incdir in filelist.incdirs {
println!("{:?}", incdir);
}
for (d, t) in filelist.defines {
match t {
None => println!("{:?}", d),
Some(te) => println!("{:?}={:?}", d, te),
};
}