lpf: Support // comments

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-05-14 13:06:58 +01:00
parent 2692c6f6cc
commit 2cebd40f2e

View File

@ -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))