sv_filelist_parser/
lib.rs

1//! # SystemVerilog Filelist Parser
2//! 
3//! A library in Rust to parse a SystemVerilog Filelist and return
4//! a list of files, include directories and defines.
5//! 
6//! Environment variables optionally enclosed in paranthesis or
7//! curly braces (i.e. `$`, `$()` or `${}`) will be automatically
8//! substituted.
9//! 
10//! ## Example
11//! 
12//! ```rust
13//! use sv_filelist_parser;
14//! let filelist = sv_filelist_parser::parse_file("testcase/files.f")
15//!     .expect("Cannot read filelist");
16//! for file in filelist.files {
17//!     println!("{:?}", file);
18//! }
19//! for incdir in filelist.incdirs {
20//!     println!("{:?}", incdir);
21//! }
22//! for (d, t) in filelist.defines {
23//!     match t {
24//!         None => println!("{:?}", d),
25//!         Some(te) => println!("{:?}={:?}", d, te),
26//!     };
27//! }
28//! ```
29
30mod file_parser;
31mod line_parser;
32
33pub use file_parser::parse_file;
34pub use file_parser::Filelist;