class: Scanner
authorClaus Gittinger <cg@exept.de>
Mon, 03 Jun 2013 12:47:42 +0200
changeset 3175 1a0f2f5e5ea6
parent 3174 e3e1c0bde329
child 3176 fecb6e599d09
class: Scanner changed: #scanNumberFrom: oops: (x // y) was scanned as Fraction
Scanner.st
--- a/Scanner.st	Wed May 29 19:25:03 2013 +0200
+++ b/Scanner.st	Mon Jun 03 12:47:42 2013 +0200
@@ -1861,6 +1861,18 @@
             source peekOrNil == $/ ifTrue:[
                 numerator := tokenValue.
                 self nextToken. "/ skip /
+                "/ oops - must check for //
+                tokenName = '/' ifFalse:[
+                    parentized ifTrue:[
+                        "/ nothing at all
+                        source position:oldPos.
+                        ^ nil.
+                    ].
+                    "/ only an integer
+                    source position:posAfter.
+                    ^ tokenValue
+                ].
+
                 self nextToken. "/ get denominator
                 tokenType == #BinaryOperator ifTrue:[
                     tokenName = '+' ifTrue:[
@@ -3572,11 +3584,11 @@
 !Scanner class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.293 2013-04-25 13:10:17 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.294 2013-06-03 10:47:42 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.293 2013-04-25 13:10:17 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.294 2013-06-03 10:47:42 cg Exp $'
 ! !