|
|
@ -74,6 +74,16 @@ public final class Scanner { |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// new type of comment, the # comment, same as before when it comes to code
|
|
|
|
|
|
|
|
case '#':{ |
|
|
|
|
|
|
|
takeIt(); |
|
|
|
|
|
|
|
while((currentChar != SourceFile.EOL) && (currentChar != SourceFile.EOT)) |
|
|
|
|
|
|
|
takeIt(); |
|
|
|
|
|
|
|
if(currentChar == SourceFile.EOL) |
|
|
|
|
|
|
|
takeIt(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
// whitespace
|
|
|
|
// whitespace
|
|
|
|
case ' ': |
|
|
|
case ' ': |
|
|
|
case '\n': |
|
|
|
case '\n': |
|
|
@ -252,7 +262,7 @@ public final class Scanner { |
|
|
|
currentlyScanningToken = false; |
|
|
|
currentlyScanningToken = false; |
|
|
|
// skip any whitespace or comments
|
|
|
|
// skip any whitespace or comments
|
|
|
|
while (currentChar == '!' || currentChar == ' ' || currentChar == '\n' || currentChar == '\r' |
|
|
|
while (currentChar == '!' || currentChar == ' ' || currentChar == '\n' || currentChar == '\r' |
|
|
|
|| currentChar == '\t') |
|
|
|
|| currentChar == '\t' || currentChar == '#') |
|
|
|
scanSeparator(); |
|
|
|
scanSeparator(); |
|
|
|
|
|
|
|
|
|
|
|
currentlyScanningToken = true; |
|
|
|
currentlyScanningToken = true; |
|
|
|