Compare commits
1 Commits
master
...
multiline-
Author | SHA1 | Date | |
---|---|---|---|
|
30fbde8c31 |
@ -247,8 +247,37 @@ public class LexAn implements AutoCloseable {
|
||||
return;
|
||||
}
|
||||
|
||||
while (buffChar != '\n' && buffChar != -1) {
|
||||
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) {
|
||||
nextChar();
|
||||
}
|
||||
}
|
||||
|
||||
nextToken();
|
||||
|
Loading…
x
Reference in New Issue
Block a user