Compare commits
No commits in common. "multiline-comments" and "master" have entirely different histories.
multiline-
...
master
@ -247,38 +247,9 @@ public class LexAn implements AutoCloseable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextChar();
|
|
||||||
if (buffChar == '{') {
|
|
||||||
int depth = 1;
|
|
||||||
|
|
||||||
nextChar();
|
|
||||||
while (depth > 0) {
|
|
||||||
switch (buffChar) {
|
|
||||||
case '}':
|
|
||||||
nextChar();
|
|
||||||
if (buffChar != '/') continue;
|
|
||||||
nextChar();
|
|
||||||
if (buffChar != '/') continue;
|
|
||||||
depth--;
|
|
||||||
break;
|
|
||||||
case '/':
|
|
||||||
nextChar();
|
|
||||||
if (buffChar != '/') continue;
|
|
||||||
nextChar();
|
|
||||||
if (buffChar != '{') continue;
|
|
||||||
depth++;
|
|
||||||
break;
|
|
||||||
case -1:
|
|
||||||
throw new Report.Error(currentLocation(), "Unterminated multiline comment");
|
|
||||||
default:
|
|
||||||
nextChar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
while (buffChar != '\n' && buffChar != -1) {
|
while (buffChar != '\n' && buffChar != -1) {
|
||||||
nextChar();
|
nextChar();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
nextToken();
|
nextToken();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user