mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-12-22 13:25:49 +00:00
Migrate to new package name
This commit is contained in:
parent
8ee39041ee
commit
3d13767002
11
Cargo.toml
11
Cargo.toml
|
@ -1,11 +1,10 @@
|
|||
[package]
|
||||
name = "verilog-filelist-parser"
|
||||
version = "0.1.2"
|
||||
authors = ["Raamakrishnan <raamakrishnan1997@gmail.com>"]
|
||||
edition = "2018"
|
||||
name = "sv-filelist-parser"
|
||||
version = "0.1.3"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "A library to parse a Verilog Filelist and return a list of files, include directories and defines"
|
||||
repository = "https://github.com/Raamakrishnan/verilog-filelist-parser"
|
||||
description = "A library to parse a SystemVerilog Filelist and return a list of files, include directories and defines"
|
||||
repository = "https://github.com/supleed2/sv-filelist-parser"
|
||||
readme = "README.md"
|
||||
categories = ["parser-implementations", "parsing", "development-tools"]
|
||||
keywords = ["verilog", "systemverilog", "filelist"]
|
||||
|
|
15
README.md
15
README.md
|
@ -1,16 +1,17 @@
|
|||
# Verilog Filelist Parser
|
||||
# SystemVerilog Filelist Parser
|
||||
|
||||
A library in Rust to parse a Verilog Filelist and return
|
||||
A library in Rust to parse a SystemVerilog Filelist and return
|
||||
a list of files, include directories and defines.
|
||||
|
||||
Environment variables represented with paranthesis or
|
||||
curly braces (i.e. `$()` or `${}`) will be automatically
|
||||
Environment variables optionally enclosed in paranthesis or
|
||||
curly braces (i.e. `$`, `$()` or `${}`) will be automatically
|
||||
substituted.
|
||||
|
||||
# Example
|
||||
## Example
|
||||
|
||||
```rust
|
||||
use verilog_filelist_parser;
|
||||
let filelist = verilog_filelist_parser::parse_file("testcase/files.f")
|
||||
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);
|
||||
|
|
17
src/lib.rs
17
src/lib.rs
|
@ -1,16 +1,17 @@
|
|||
//! # Verilog Filelist Parser
|
||||
//! # SystemVerilog Filelist Parser
|
||||
//!
|
||||
//! A library to parse a Verilog Filelist and return
|
||||
//! A library in Rust to parse a SystemVerilog Filelist and return
|
||||
//! a list of files, include directories and defines.
|
||||
//!
|
||||
//! Environment variables represented with paranthesis or
|
||||
//! curly braces (i.e. `$()` or `${}`) will be automatically
|
||||
//! Environment variables optionally enclosed in paranthesis or
|
||||
//! curly braces (i.e. `$`, `$()` or `${}`) will be automatically
|
||||
//! substituted.
|
||||
//!
|
||||
//! # Example
|
||||
//! ```
|
||||
//! use verilog_filelist_parser;
|
||||
//! let filelist = verilog_filelist_parser::parse_file("testcase/files.f")
|
||||
//! ## 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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use verilog_filelist_parser;
|
||||
use sv_filelist_parser;
|
||||
|
||||
#[test]
|
||||
fn simple_test() {
|
||||
|
@ -13,7 +13,7 @@ fn simple_test() {
|
|||
defines.insert("ENV_VAR3".to_string(), Some("var3".to_string()));
|
||||
defines.insert("RTL".to_string(), None);
|
||||
|
||||
let filelist_exp = verilog_filelist_parser::Filelist {
|
||||
let filelist_exp = sv_filelist_parser::Filelist {
|
||||
files: vec![
|
||||
PathBuf::from("testcase/file1.sv"),
|
||||
PathBuf::from("testcase/file2.sv"),
|
||||
|
@ -31,6 +31,6 @@ fn simple_test() {
|
|||
std::env::set_var("VAR2", "ENV_VAR2");
|
||||
std::env::set_var("VAR3", "ENV_VAR3");
|
||||
|
||||
let filelist = verilog_filelist_parser::parse_file("testcase/files.f").expect("Error parsing");
|
||||
let filelist = sv_filelist_parser::parse_file("testcase/files.f").expect("Error parsing");
|
||||
assert_eq!(filelist_exp, filelist);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue