|
|
@ -63,6 +63,8 @@ public final class Scanner { |
|
|
|
|
|
|
|
|
|
|
|
private void scanSeparator() { |
|
|
|
private void scanSeparator() { |
|
|
|
switch (currentChar) { |
|
|
|
switch (currentChar) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// comment
|
|
|
|
case '!': { |
|
|
|
case '!': { |
|
|
|
takeIt(); |
|
|
|
takeIt(); |
|
|
|
while ((currentChar != SourceFile.EOL) && (currentChar != SourceFile.EOT)) |
|
|
|
while ((currentChar != SourceFile.EOL) && (currentChar != SourceFile.EOT)) |
|
|
@ -72,6 +74,7 @@ public final class Scanner { |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// whitespace
|
|
|
|
case ' ': |
|
|
|
case ' ': |
|
|
|
case '\n': |
|
|
|
case '\n': |
|
|
|
case '\r': |
|
|
|
case '\r': |
|
|
@ -247,6 +250,7 @@ public final class Scanner { |
|
|
|
int kind; |
|
|
|
int kind; |
|
|
|
|
|
|
|
|
|
|
|
currentlyScanningToken = false; |
|
|
|
currentlyScanningToken = false; |
|
|
|
|
|
|
|
// skip any whitespace or comments
|
|
|
|
while (currentChar == '!' || currentChar == ' ' || currentChar == '\n' || currentChar == '\r' |
|
|
|
while (currentChar == '!' || currentChar == ' ' || currentChar == '\n' || currentChar == '\r' |
|
|
|
|| currentChar == '\t') |
|
|
|
|| currentChar == '\t') |
|
|
|
scanSeparator(); |
|
|
|
scanSeparator(); |
|
|
|