lpf: Support // comments
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
2692c6f6cc
commit
2cebd40f2e
@ -46,6 +46,9 @@ bool Arch::applyLPF(std::string filename, std::istream &in)
|
|||||||
while (std::getline(in, line)) {
|
while (std::getline(in, line)) {
|
||||||
++lineno;
|
++lineno;
|
||||||
size_t cstart = line.find('#');
|
size_t cstart = line.find('#');
|
||||||
|
if (cstart != std::string::npos)
|
||||||
|
line = line.substr(0, cstart);
|
||||||
|
cstart = line.find("//");
|
||||||
if (cstart != std::string::npos)
|
if (cstart != std::string::npos)
|
||||||
line = line.substr(0, cstart);
|
line = line.substr(0, cstart);
|
||||||
if (isempty(line))
|
if (isempty(line))
|
||||||
|
Loading…
Reference in New Issue
Block a user