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 (;;) { for (;;) {
StartLoc = getCurrentLoc(); StartLoc = getCurrentLoc();
C0 = getChar(); C0 = getChar();
if (!isWhiteSpace(C0)) { if (isWhiteSpace(C0)) {
break; continue;
} }
if (C0 == '#') {
for (;;) {
C0 = getChar();
if (C0 == '\n' || C0 == EOF) {
break;
}
}
continue;
}
break;
} }
switch (C0) { switch (C0) {