sv-filelist-parser

Crates.iosv-filelist-parser
lib.rssv-filelist-parser
version0.1.3
sourcesrc
created_at2022-05-12 16:26:38.627469
updated_at2022-05-12 16:26:38.627469
descriptionA library to parse a SystemVerilog Filelist and return a list of files, include directories and defines
homepage
repositoryhttps://github.com/supleed2/sv-filelist-parser
max_upload_size
id585349
size14,971
Aadi Desai (supleed2)

documentation

README

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

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),
    };
}
Commit count: 42

cargo fmt