Allow line comments in Bolt sources

This commit is contained in:
Sam Vervaeck 2022-08-25 16:12:47 +02:00
parent fcea25c9bb
commit 45b5f113a0

View file

@ -77,9 +77,19 @@ namespace bolt {
for (;;) {
StartLoc = getCurrentLoc();
C0 = getChar();
if (!isWhiteSpace(C0)) {
break;
if (isWhiteSpace(C0)) {
continue;
}
if (C0 == '#') {
for (;;) {
C0 = getChar();
if (C0 == '\n' || C0 == EOF) {
break;
}
}
continue;
}
break;
}
switch (C0) {