From 2cebd40f2e26207f1ac22471ac269ede2784c7d0 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 14 May 2020 13:06:58 +0100 Subject: lpf: Support // comments Signed-off-by: David Shah --- ecp5/lpf.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ecp5') diff --git a/ecp5/lpf.cc b/ecp5/lpf.cc index e626cc54..e740b737 100644 --- a/ecp5/lpf.cc +++ b/ecp5/lpf.cc @@ -46,6 +46,9 @@ bool Arch::applyLPF(std::string filename, std::istream &in) while (std::getline(in, line)) { ++lineno; size_t cstart = line.find('#'); + if (cstart != std::string::npos) + line = line.substr(0, cstart); + cstart = line.find("//"); if (cstart != std::string::npos) line = line.substr(0, cstart); if (isempty(line)) -- cgit v1.2.3