3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-07 14:45:18 +00:00

Improve handling of comments in .sby files

This commit is contained in:
Clifford Wolf 2018-01-19 14:26:42 +01:00
parent 6b730e7779
commit 221c8d24d7

View file

@ -188,11 +188,13 @@ class SbyJob:
with open("%s/config.sby" % workdir, "r") as f:
for line in f:
raw_line = line
line = line.strip()
# print(line)
if mode in ["options", "engines", "files"]:
line = re.sub(r"\s*(\s#.*)?$", "", line)
if line == "" or line[0] == "#":
continue
else:
line = line.rstrip()
# print(line)
match = re.match(r"^\s*\[(.*)\]\s*$", line)
if match: