Bugfix in JavaScanner - correctly handle dot a the end of input.
Do not try to read past the stream end.
--- a/tools/JavaScanner.st Wed May 14 00:07:29 2014 +0100
+++ b/tools/JavaScanner.st Wed May 14 16:36:12 2014 +0100
@@ -471,24 +471,27 @@
|nextChar nextChar2|
nextChar := source nextPeek.
- nextChar isDigit ifTrue:[
- ^ self nextFractionalPart:0.
- ].
- nextChar == $. ifTrue:[
- nextChar2 := source nextPeek.
- nextChar2 == $. ifTrue:[
- source next.
- tokenType := #Ellipsis.
- tokenValue := '...'.
- ^tokenType.
- ] ifFalse:[
- source skip: -1.
+ (nextChar isNil and:[ source atEnd ]) ifFalse:[
+ nextChar isDigit ifTrue:[
+ ^ self nextFractionalPart:0.
+ ].
+ nextChar == $. ifTrue:[
+ nextChar2 := source nextPeek.
+ nextChar2 == $. ifTrue:[
+ source next.
+ tokenType := #Ellipsis.
+ tokenValue := '...'.
+ ^tokenType.
+ ] ifFalse:[
+ source skip: -1.
+ ].
].
].
tokenType := tokenValue := $. .
^ tokenType
"Created: / 15-03-2012 / 10:08:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-05-2014 / 16:12:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
nextFractionalPart:intValue