mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-11-10 01:35:49 +00:00
Parse lines starting with # as comments
This commit is contained in:
parent
8fbcfb64d8
commit
6906c4fa60
|
@ -34,7 +34,7 @@ pub fn parse_line(line: &str) -> LineType {
|
||||||
let incdirs = line.trim_start_matches("+incdir+").trim_end_matches('+');
|
let incdirs = line.trim_start_matches("+incdir+").trim_end_matches('+');
|
||||||
let incdir_vec: Vec<&str> = incdirs.split('+').collect();
|
let incdir_vec: Vec<&str> = incdirs.split('+').collect();
|
||||||
LineType::IncDir(incdir_vec)
|
LineType::IncDir(incdir_vec)
|
||||||
} else if line.starts_with("//") {
|
} else if line.starts_with("//") || line.starts_with("#") {
|
||||||
LineType::Comment
|
LineType::Comment
|
||||||
} else if line.starts_with('-') || line.starts_with('+') {
|
} else if line.starts_with('-') || line.starts_with('+') {
|
||||||
LineType::Unknown
|
LineType::Unknown
|
||||||
|
|
|
@ -3,6 +3,7 @@ testcase/file2.sv
|
||||||
testcase/file3.sv
|
testcase/file3.sv
|
||||||
+incdir+testcase/
|
+incdir+testcase/
|
||||||
// Some comment
|
// Some comment
|
||||||
|
# Another comment
|
||||||
+define+a=b+c=d+e=f
|
+define+a=b+c=d+e=f
|
||||||
+define+$(VAR1)=var1
|
+define+$(VAR1)=var1
|
||||||
+define+${VAR2}=var2
|
+define+${VAR2}=var2
|
||||||
|
|
Loading…
Reference in a new issue