mirror of
https://github.com/supleed2/sv-filelist-parser.git
synced 2024-12-22 13:25: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 incdir_vec: Vec<&str> = incdirs.split('+').collect();
|
||||
LineType::IncDir(incdir_vec)
|
||||
} else if line.starts_with("//") {
|
||||
} else if line.starts_with("//") || line.starts_with("#") {
|
||||
LineType::Comment
|
||||
} else if line.starts_with('-') || line.starts_with('+') {
|
||||
LineType::Unknown
|
||||
|
|
|
@ -3,6 +3,7 @@ testcase/file2.sv
|
|||
testcase/file3.sv
|
||||
+incdir+testcase/
|
||||
// Some comment
|
||||
# Another comment
|
||||
+define+a=b+c=d+e=f
|
||||
+define+$(VAR1)=var1
|
||||
+define+${VAR2}=var2
|
||||
|
|
Loading…
Reference in a new issue