fixed regex to ignore comments

This commit is contained in:
Matt Venn
2023-04-24 12:28:09 +02:00
parent 2b4acb3a69
commit fe7ff9b460
+1 -1
View File
@@ -177,7 +177,7 @@ class Project():
# top module name is defined in one of the source files, which one? # top module name is defined in one of the source files, which one?
def find_top_verilog(self): def find_top_verilog(self):
rgx_mod = re.compile(r"(?:^|[\W])module[\s]{1,}([\w]+)") rgx_mod = re.compile(r"(?:^|[\s])module[\s]{1,}([\w]+)")
top_verilog = [] top_verilog = []
for src in self.src_files: for src in self.src_files:
with open(os.path.join(self.local_dir, 'src', src)) as fh: with open(os.path.join(self.local_dir, 'src', src)) as fh: