1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
//! # SystemVerilog Filelist Parser
//!
//! A library in Rust to parse a SystemVerilog Filelist and return
//! a list of files, include directories and defines.
//!
//! Environment variables optionally enclosed in paranthesis or
//! curly braces (i.e. `$`, `$()` or `${}`) will be automatically
//! substituted.
//!
//! ## Example
//!
//! ```rust
//! use sv_filelist_parser;
//! let filelist = sv_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),
//! };
//! }
//! ```
mod file_parser;
mod line_parser;
pub use file_parser::parse_file;
pub use file_parser::Filelist;